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

Method functionArgs2

test/testsymboldatabase.cpp:2712–2721  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2710 }
2711
2712 void functionArgs2() {
2713 GET_SYMBOL_DB("void f(int a[][4]) { }");
2714 const Variable *a = db->getVariableFromVarId(1);
2715 ASSERT_EQUALS("a", a->nameToken()->str());
2716 ASSERT_EQUALS(2UL, a->dimensions().size());
2717 ASSERT_EQUALS(0UL, a->dimension(0));
2718 ASSERT_EQUALS(false, a->dimensions()[0].known);
2719 ASSERT_EQUALS(4UL, a->dimension(1));
2720 ASSERT_EQUALS(true, a->dimensions()[1].known);
2721 }
2722
2723 void functionArgs4() {
2724 GET_SYMBOL_DB("void f1(char [10], struct foo [10]);");

Callers

nothing calls this directly

Calls 3

strMethod · 0.45
nameTokenMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected