MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / hasUnknownType

Function hasUnknownType

lib/valueflow.cpp:522–537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

520}
521
522static bool hasUnknownType(const std::vector<const Token*>& toks)
523{
524 if (toks.empty())
525 return true;
526 return std::any_of(toks.begin(), toks.end(), [&](const Token* tok) {
527 if (!tok)
528 return true;
529 if (Token::Match(tok, "const|volatile|&|*|&&|%type%|::"))
530 return false;
531 if (Token::Match(tok, "%name% :: %name%"))
532 return false;
533 if (tok->type())
534 return false;
535 return true;
536 });
537}
538
539static void stripCV(std::vector<const Token*>& toks)
540{

Callers 1

valueFlowTypeTraitsFunction · 0.85

Calls 4

typeMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected