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

Method varTypesOther

test/testsymboldatabase.cpp:9298–9309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9296 }
9297
9298 void varTypesOther() {
9299 GET_SYMBOL_DB("void f() { class A {} a; void *b; }");
9300 const Variable *a = db->getVariableFromVarId(1);
9301 ASSERT(a != nullptr);
9302 ASSERT_EQUALS("a", a->nameToken()->str());
9303 ASSERT_EQUALS(false, a->isFloatingType());
9304
9305 const Variable *b = db->getVariableFromVarId(2);
9306 ASSERT(b != nullptr);
9307 ASSERT_EQUALS("b", b->nameToken()->str());
9308 ASSERT_EQUALS(false, b->isFloatingType());
9309 }
9310
9311 void functionPrototype() {
9312 check("int foo(int x) {\n"

Callers

nothing calls this directly

Calls 2

strMethod · 0.45
nameTokenMethod · 0.45

Tested by

no test coverage detected