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

Method enum2

test/testsymboldatabase.cpp:6286–6294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6284 }
6285
6286 void enum2() {
6287 GET_SYMBOL_DB("enum BOOL { FALSE, TRUE } b;");
6288
6289 /* there is a enum scope with the name BOOL */
6290 ASSERT(db && db->scopeList.back().type == ScopeType::eEnum && db->scopeList.back().className == "BOOL");
6291
6292 /* b is a enum variable, type is BOOL */
6293 ASSERT(db && db->getVariableFromVarId(1)->isEnumType());
6294 }
6295
6296 void enum3() {
6297 GET_SYMBOL_DB("enum ABC { A=11,B,C=A+B };");

Callers

nothing calls this directly

Calls 1

isEnumTypeMethod · 0.80

Tested by

no test coverage detected