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

Method checkVirtualDestructor_

test/testclass.cpp:2652–2662  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2650#define checkVirtualDestructor(...) checkVirtualDestructor_(__FILE__, __LINE__, __VA_ARGS__)
2651 template<size_t size>
2652 void checkVirtualDestructor_(const char* file, int line, const char (&code)[size], const CheckVirtualDestructorOptions& options = make_default_obj()) {
2653 const Settings& s = options.inconclusive ? settings3_i : settings3;
2654
2655 // Tokenize..
2656 SimpleTokenizer tokenizer(s, *this);
2657 ASSERT_LOC(tokenizer.tokenize(code), file, line);
2658
2659 // Check..
2660 CheckClassImpl checkClass(&tokenizer, s, *this);
2661 checkClass.virtualDestructor();
2662 }
2663
2664 void virtualDestructor1() {
2665 // Base class not found

Callers

nothing calls this directly

Calls 3

make_default_objClass · 0.85
tokenizeMethod · 0.80
virtualDestructorMethod · 0.80

Tested by

no test coverage detected