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

Method enum10

test/testsymboldatabase.cpp:6555–6566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6553 }
6554
6555 void enum10() { // #11001
6556 GET_SYMBOL_DB_C("int b = sizeof(enum etag {X, Y});\n");
6557 ASSERT(db != nullptr);
6558 const Enumerator *X = db->scopeList.back().findEnumerator("X");
6559 ASSERT(X);
6560 ASSERT(X->value_known);
6561 ASSERT_EQUALS(X->value, 0);
6562 const Enumerator *Y = db->scopeList.back().findEnumerator("Y");
6563 ASSERT(Y);
6564 ASSERT(Y->value_known);
6565 ASSERT_EQUALS(Y->value, 1);
6566 }
6567
6568 void enum11() {
6569 check("enum class E;\n");

Callers

nothing calls this directly

Calls 1

findEnumeratorMethod · 0.80

Tested by

no test coverage detected