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

Method namespaces4

test/testsymboldatabase.cpp:3218–3226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3216 }
3217
3218 void namespaces4() { // #4698 - type lookup
3219 GET_SYMBOL_DB("struct A { int a; };\n"
3220 "namespace fred { struct A {}; }\n"
3221 "fred::A fredA;");
3222 const Variable *fredA = db->getVariableFromVarId(2U);
3223 ASSERT_EQUALS("fredA", fredA->name());
3224 const Type *fredAType = fredA->type();
3225 ASSERT_EQUALS(2U, fredAType->classDef->linenr());
3226 }
3227
3228 void namespaces5() { // #13967
3229 GET_SYMBOL_DB("namespace test {\n"

Callers

nothing calls this directly

Calls 2

typeMethod · 0.80
nameMethod · 0.45

Tested by

no test coverage detected