Bug hunting; Terminating analysis
This commit is contained in:
parent
176826a1f5
commit
8d6fd4769b
|
@ -154,6 +154,7 @@ namespace {
|
|||
const Token *tok;
|
||||
const std::string what;
|
||||
};
|
||||
struct TerminateExpression {};
|
||||
}
|
||||
|
||||
static std::string str(ExprEngine::ValuePtr val)
|
||||
|
@ -2153,6 +2154,9 @@ static ExprEngine::ValuePtr executeStringLiteral(const Token *tok, Data &data)
|
|||
|
||||
static ExprEngine::ValuePtr executeExpression1(const Token *tok, Data &data)
|
||||
{
|
||||
if (data.settings->terminated())
|
||||
throw TerminateExpression();
|
||||
|
||||
if (tok->str() == "return")
|
||||
return executeReturn(tok, data);
|
||||
|
||||
|
@ -2489,6 +2493,8 @@ void ExprEngine::executeAllFunctions(ErrorLogger *errorLogger, const Tokenizer *
|
|||
// FIXME.. there should not be exceptions
|
||||
std::string functionName = functionScope->function->name();
|
||||
std::cout << "Verify: Aborted analysis of function '" << functionName << "': " << e.what() << std::endl;
|
||||
} catch (const TerminateExpression &) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue