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

Method functionArgs5

test/testsymboldatabase.cpp:2739–2752  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2737 }
2738
2739 void functionArgs5() { // #7650
2740 GET_SYMBOL_DB("class ABC {};\n"
2741 "class Y {\n"
2742 " enum ABC {A,B,C};\n"
2743 " void f(enum ABC abc) {}\n"
2744 "};");
2745 ASSERT_EQUALS(true, db != nullptr);
2746 const Token *f = Token::findsimplematch(tokenizer.tokens(), "f ( enum");
2747 ASSERT_EQUALS(true, f && f->function());
2748 const Function *func = f->function();
2749 ASSERT_EQUALS(true, func->argumentList.size() == 1 && func->argumentList.front().type());
2750 const Type * type = func->argumentList.front().type();
2751 ASSERT_EQUALS(true, type->isEnumType());
2752 }
2753
2754 void functionArgs6() { // #7651
2755 GET_SYMBOL_DB("class ABC {};\n"

Callers

nothing calls this directly

Calls 6

findsimplematchFunction · 0.85
typeMethod · 0.80
frontMethod · 0.80
isEnumTypeMethod · 0.80
functionMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected