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

Method checkCodeInternal_

test/testgarbage.cpp:283–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281#define checkCodeInternal(...) checkCodeInternal_(__FILE__, __LINE__, __VA_ARGS__)
282 template<size_t size>
283 std::string checkCodeInternal_(const char* file, int line, const char (&code)[size], bool cpp) {
284 // tokenize..
285 SimpleTokenizer tokenizer(settings, *this, cpp);
286 ASSERT_LOC(tokenizer.tokenize(code), file, line);
287
288 // call all "runChecks" in all registered Check classes
289 for (Check * const c : CheckInstances::get()) {
290 c->runChecks(tokenizer, *this);
291 }
292
293 return tokenizer.tokens()->stringifyList(false, false, false, true, false, nullptr, nullptr);
294 }
295
296 template<size_t size>
297 std::string checkCode(const char (&code)[size], bool cpp = true) {

Callers

nothing calls this directly

Calls 4

tokenizeMethod · 0.80
stringifyListMethod · 0.80
getFunction · 0.50
runChecksMethod · 0.45

Tested by

no test coverage detected