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

Method isPure

test/testsymboldatabase.cpp:7092–7105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7090 }
7091
7092 void isPure() {
7093 GET_SYMBOL_DB("class C {\n"
7094 " void f() = 0;\n"
7095 " C(B b) = 0;\n"
7096 " C(C& c) = default;"
7097 " void g();\n"
7098 "};");
7099 ASSERT(db && db->scopeList.back().functionList.size() == 4);
7100 auto it = db->scopeList.back().functionList.cbegin();
7101 ASSERT((it++)->isPure());
7102 ASSERT((it++)->isPure());
7103 ASSERT(!(it++)->isPure());
7104 ASSERT(!(it++)->isPure());
7105 }
7106
7107 void isFunction1() { // #5602 - UNKNOWN_MACRO(a,b) { .. }
7108 GET_SYMBOL_DB("TEST(a,b) {\n"

Callers 8

printOutMethod · 0.80
findFunctionMethod · 0.80
parseTokensMethod · 0.80
checkclass.cppFile · 0.80
checkUselessOverrideMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected