@@ -662,7 +662,7 @@ void ScParseExprValue::parseExpr(CXXConstructExpr* expr, SValue& val)
662662 << expr->getType ();
663663 }
664664 } else {
665- SCT_TOOL_ASSERT ( false , " Unexpected argument number" );
665+ SCT_INTERNAL_ERROR (expr-> getBeginLoc () , " Unexpected argument number" );
666666 }
667667
668668 // Create SC type single object value
@@ -965,7 +965,10 @@ void ScParseExprValue::parseImplExplCast(CastExpr* expr, SValue& rval,
965965 if (val.isInteger ()) {
966966 QualType type = expr->getType ();
967967 auto typeInfo = getIntTraits (type, true );
968- SCT_TOOL_ASSERT (typeInfo, " No integral type width extracted" );
968+ if (!typeInfo) {
969+ SCT_INTERNAL_ERROR (expr->getBeginLoc (),
970+ " No integral type width extracted" );
971+ }
969972 size_t width = typeInfo.getValue ().first ;
970973 bool isUnsigned = typeInfo.getValue ().second ;
971974
@@ -1011,9 +1014,8 @@ void ScParseExprValue::parseExpr(ExplicitCastExpr* expr, SValue& rval, SValue& v
10111014 ScDiag::SYNTH_LVALUE_BIT_CAST);
10121015 } else {
10131016 cout << " Cast kind " << expr->getCastKindName (castKind) << endl;
1014- expr->getBeginLoc ().dump (sm);
1015- expr->dumpColor ();
1016- SCT_TOOL_ASSERT (false , " Unsupported cast kind in ExplicitCastExpr" );
1017+ SCT_INTERNAL_ERROR (expr->getBeginLoc (),
1018+ " Unsupported cast kind in ExplicitCastExpr" );
10171019 }
10181020 }
10191021 } else
@@ -1579,6 +1581,7 @@ void ScParseExprValue::parseCompoundAssignStmt(CompoundAssignOperator* stmt,
15791581 if (opcode == BO_XorAssign) {
15801582 res = val1 ^ val2;
15811583 } else {
1584+ cout << " Opcode " << opcode << endl;
15821585 SCT_TOOL_ASSERT (false , " parseCompAssign : Unknown integer opcode" );
15831586 }
15841587
@@ -2206,7 +2209,7 @@ void ScParseExprValue::parseMemberCall(CXXMemberCallExpr* callExpr, SValue& tval
22062209 val = ttval;
22072210
22082211 } else {
2209- SCT_TOOL_ASSERT ( false , " Unknown cast" );
2212+ SCT_INTERNAL_ERROR (callExpr-> getBeginLoc () , " Unknown cast" );
22102213 }
22112214 }
22122215 } else
@@ -2279,7 +2282,10 @@ void ScParseExprValue::parseMemberCall(CXXMemberCallExpr* callExpr, SValue& tval
22792282 if (val.isInteger ()) {
22802283 QualType type = callExpr->getType ();
22812284 auto typeInfo = getIntTraits (type, true );
2282- SCT_TOOL_ASSERT (typeInfo, " No integral type width extracted" );
2285+ if (!typeInfo) {
2286+ SCT_INTERNAL_ERROR (callExpr->getBeginLoc (),
2287+ " No integral type width extracted" );
2288+ }
22832289 size_t width = typeInfo.getValue ().first ;
22842290 bool isUnsigned = typeInfo.getValue ().second ;
22852291
@@ -2714,6 +2720,7 @@ void ScParseExprValue::parseOperatorCall(CXXOperatorCallExpr* expr, SValue& val)
27142720 if (opcode == OO_Pipe) {
27152721 res = val1 | val2;
27162722 } else {
2723+ cout << " Opcode " << opcode << endl;
27172724 SCT_TOOL_ASSERT (false , " Unknown opcode for SC type operator" );
27182725 }
27192726
@@ -2833,6 +2840,7 @@ void ScParseExprValue::parseOperatorCall(CXXOperatorCallExpr* expr, SValue& val)
28332840 if (opcode == OO_CaretEqual) {
28342841 res = val1 ^ val2;
28352842 } else {
2843+ cout << " Opcode " << opcode << endl;
28362844 SCT_TOOL_ASSERT (false , " Unknown opcode for SC type operator" );
28372845 }
28382846
@@ -2915,7 +2923,8 @@ void ScParseExprValue::parseReturnStmt(ReturnStmt* stmt, SValue& val)
29152923 if (returnValue.isUnknown ()) {
29162924 // Do nothing
29172925 } else {
2918- SCT_TOOL_ASSERT (false , " Unexpected kind of return variable value" );
2926+ SCT_INTERNAL_ERROR (stmt->getBeginLoc (),
2927+ " Unexpected kind of return variable value" );
29192928 }
29202929
29212930 if (returnStmtFunc) {
0 commit comments