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

Method dumpFriend

test/testsymboldatabase.cpp:11441–11452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11439 }
11440
11441 void dumpFriend() {
11442 GET_SYMBOL_DB("class Foo {\n"
11443 " Foo();\n"
11444 " int x{};\n"
11445 " friend bool operator==(const Foo&lhs, const Foo&rhs) {\n"
11446 " return lhs.x == rhs.x;\n"
11447 " }\n"
11448 "};");
11449 std::ostringstream ostr;
11450 db->printXml(ostr);
11451 ASSERT(ostr.str().find(" isFriend=\"true\"") != std::string::npos);
11452 }
11453
11454 void smartPointerLookupCtor() { // #13719
11455 // do not crash in smartpointer lookup

Callers

nothing calls this directly

Calls 3

printXmlMethod · 0.80
findMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected