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

Method funcnameInParenthesis1

test/testtokenize.cpp:8929–8938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8927 }
8928
8929 void funcnameInParenthesis1() { // #13554
8930 const char code[] = "void f(void) {\n"
8931 " double result = (strtod)(\"NAN\", NULL);\n"
8932 "}\n";
8933 SimpleTokenizer tokenizer(settings1, *this, false);
8934 ASSERT_LOC(tokenizer.tokenize(code), __FILE__, __LINE__);
8935 const Token *f = Token::findsimplematch(tokenizer.tokens(), "strtod");
8936 ASSERT(f);
8937 ASSERT(!f->previous()->isCast());
8938 }
8939
8940 void funcnameInParenthesis2() { // #13578
8941 const char code[] = "int f(double a, double b, double c) {\n"

Callers

nothing calls this directly

Calls 3

findsimplematchFunction · 0.85
tokenizeMethod · 0.80
isCastMethod · 0.80

Tested by

no test coverage detected