parent
8dd641b8be
commit
2b1b8f8fe9
|
@ -1046,7 +1046,7 @@ bool isConstVarExpression(const Token *tok)
|
||||||
{
|
{
|
||||||
if (!tok)
|
if (!tok)
|
||||||
return false;
|
return false;
|
||||||
if (Token::Match(tok->previous(), "sizeof ("))
|
if (Token::simpleMatch(tok->previous(), "sizeof ("))
|
||||||
return true;
|
return true;
|
||||||
if (Token::Match(tok->previous(), "%name% (")) {
|
if (Token::Match(tok->previous(), "%name% (")) {
|
||||||
std::vector<const Token *> args = getArguments(tok);
|
std::vector<const Token *> args = getArguments(tok);
|
||||||
|
@ -1223,7 +1223,7 @@ struct FwdAnalysis::Result FwdAnalysis::checkRecursive(const Token *expr, const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Token::Match(tok, ") {")) {
|
if (Token::simpleMatch(tok, ") {")) {
|
||||||
if (Token::simpleMatch(tok->link()->previous(), "switch ("))
|
if (Token::simpleMatch(tok->link()->previous(), "switch ("))
|
||||||
// TODO: parse switch
|
// TODO: parse switch
|
||||||
return Result(Result::Type::BAILOUT);
|
return Result(Result::Type::BAILOUT);
|
||||||
|
|
|
@ -45,9 +45,9 @@ std::string CTU::getFunctionId(const Tokenizer *tokenizer, const Function *funct
|
||||||
}
|
}
|
||||||
|
|
||||||
CTU::FileInfo::Location::Location(const Tokenizer *tokenizer, const Token *tok)
|
CTU::FileInfo::Location::Location(const Tokenizer *tokenizer, const Token *tok)
|
||||||
|
: fileName(tokenizer->list.file(tok))
|
||||||
|
, linenr(tok->linenr())
|
||||||
{
|
{
|
||||||
fileName = tokenizer->list.file(tok);
|
|
||||||
linenr = tok->linenr();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CTU::FileInfo::toString() const
|
std::string CTU::FileInfo::toString() const
|
||||||
|
|
Loading…
Reference in New Issue