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

Method check_

test/testunusedprivfunc.cpp:98–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96#define check(...) check_(__FILE__, __LINE__, __VA_ARGS__)
97 template<size_t size>
98 void check_(const char* file, int line, const char (&code)[size], const CheckOptions& options = make_default_obj()) {
99 const Settings settings1 = settingsBuilder(settings).platform(options.platform).build();
100
101 SimpleTokenizer2 tokenizer(settings1, *this, code, "test.cpp");
102
103 // Tokenize..
104 ASSERT_LOC(tokenizer.simplifyTokens1(""), file, line);
105
106 // Check for unused private functions..
107 CheckClassImpl checkClass(&tokenizer, settings1, *this);
108 checkClass.privateFunctions();
109 }
110
111 void test1() {
112 check("class Fred\n"

Callers

nothing calls this directly

Calls 4

make_default_objClass · 0.85
buildMethod · 0.80
simplifyTokens1Method · 0.80
privateFunctionsMethod · 0.80

Tested by

no test coverage detected