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

Method functionArgs9

test/testsymboldatabase.cpp:2850–2864  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2848 }
2849
2850 void functionArgs9() { // #7657
2851 GET_SYMBOL_DB("struct A {\n"
2852 " struct B {\n"
2853 " enum C { };\n"
2854 " };\n"
2855 "};\n"
2856 "void foo(A::B::C c) { }");
2857 ASSERT_EQUALS(true, db != nullptr);
2858 const Token *f = Token::findsimplematch(tokenizer.tokens(), "foo (");
2859 ASSERT_EQUALS(true, f && f->function());
2860 const Function *func = f->function();
2861 ASSERT_EQUALS(true, func->argumentList.size() == 1 && func->argumentList.front().type());
2862 const Type * type = func->argumentList.front().type();
2863 ASSERT_EQUALS(true, type->isEnumType());
2864 }
2865
2866 void functionArgs10() {
2867 GET_SYMBOL_DB("class Fred {\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