Run normal checks on --clang output

This commit is contained in:
Daniel Marjamäki 2020-01-24 18:04:39 +01:00
parent 7280dab5b2
commit 7db54bde6f
2 changed files with 5 additions and 2 deletions

View File

@ -74,6 +74,8 @@ static bool isRefPtrArg(const Token *tok)
static bool isNonReferenceArg(const Token *tok)
{
const Variable *var = tok->variable();
if (var && !var->valueType())
throw InternalError(tok, "var without valueType");
return (var && var->isArgument() && !var->isReference() && (var->isPointer() || var->valueType()->type >= ValueType::Type::CONTAINER || var->type()));
}

View File

@ -340,12 +340,13 @@ unsigned int CppCheck::check(const std::string &path)
ValueFlow::setValues(&tokenizer.list, const_cast<SymbolDatabase *>(tokenizer.getSymbolDatabase()), this, &mSettings);
if (mSettings.debugnormal)
tokenizer.printDebugOutput(1);
#ifdef USE_Z3
if (mSettings.bugHunting)
ExprEngine::runChecks(this, &tokenizer, &mSettings);
else
#endif
return 0;
checkNormalTokens(tokenizer);
return mExitCode;
}
std::ifstream fin(path);