| 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" |
nothing calls this directly
no test coverage detected