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

Method functionArgs6

test/testsymboldatabase.cpp:2754–2767  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2752 }
2753
2754 void functionArgs6() { // #7651
2755 GET_SYMBOL_DB("class ABC {};\n"
2756 "class Y {\n"
2757 " enum ABC {A,B,C};\n"
2758 " void f(ABC abc) {}\n"
2759 "};");
2760 ASSERT_EQUALS(true, db != nullptr);
2761 const Token *f = Token::findsimplematch(tokenizer.tokens(), "f ( ABC");
2762 ASSERT_EQUALS(true, f && f->function());
2763 const Function *func = f->function();
2764 ASSERT_EQUALS(true, func->argumentList.size() == 1 && func->argumentList.front().type());
2765 const Type * type = func->argumentList.front().type();
2766 ASSERT_EQUALS(true, type->isEnumType());
2767 }
2768
2769 void functionArgs7() { // #7652
2770 {

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