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

Method functionArgs12

test/testsymboldatabase.cpp:2902–2918  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2900 }
2901
2902 void functionArgs12() { // #7661
2903 GET_SYMBOL_DB("struct A {\n"
2904 " enum E { };\n"
2905 " int a[10];\n"
2906 "};\n"
2907 "struct B : public A {\n"
2908 " void foo(B::E e) { }\n"
2909 "};");
2910
2911 ASSERT_EQUALS(true, db != nullptr);
2912 const Token *f = Token::findsimplematch(tokenizer.tokens(), "foo (");
2913 ASSERT_EQUALS(true, f && f->function());
2914 const Function *func = f->function();
2915 ASSERT_EQUALS(true, func->argumentList.size() == 1 && func->argumentList.front().type());
2916 const Type * type = func->argumentList.front().type();
2917 ASSERT_EQUALS(true, type->isEnumType());
2918 }
2919
2920 void functionArgs13() { // #7697
2921 GET_SYMBOL_DB("struct A {\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