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

Method checkVirtualFunctionCall_

test/testclass.cpp:8346–8356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8344#define checkVirtualFunctionCall(...) checkVirtualFunctionCall_(__FILE__, __LINE__, __VA_ARGS__)
8345 template<size_t size>
8346 void checkVirtualFunctionCall_(const char* file, int line, const char (&code)[size]) {
8347 // Check..
8348 const Settings settings = settingsBuilder().severity(Severity::warning).severity(Severity::style).certainty(Certainty::inconclusive).build();
8349
8350 // Tokenize..
8351 SimpleTokenizer tokenizer(settings, *this);
8352 ASSERT_LOC(tokenizer.tokenize(code), file, line);
8353
8354 CheckClassImpl checkClass(&tokenizer, settings, *this);
8355 checkClass.checkVirtualFunctionCallInConstructor();
8356 }
8357
8358 void virtualFunctionCallInConstructor() {
8359 checkVirtualFunctionCall("class A\n"

Callers

nothing calls this directly

Calls 3

buildMethod · 0.80
tokenizeMethod · 0.80

Tested by

no test coverage detected