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

Method ctu_

test/testnullpointer.cpp:4688–4705  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4686#define ctu(...) ctu_(__FILE__, __LINE__, __VA_ARGS__)
4687 template<size_t size>
4688 void ctu_(const char* file, int line, const char (&code)[size]) {
4689 // Tokenize..
4690 SimpleTokenizer tokenizer(settings, *this);
4691 ASSERT_LOC(tokenizer.tokenize(code), file, line);
4692
4693 const CTU::FileInfo *ctu = CTU::getFileInfo(tokenizer);
4694
4695 CheckNullPointer check;
4696 Check& c = getCheck(check);
4697 std::list<const Check::FileInfo*> fileInfo;
4698 fileInfo.push_back(c.getFileInfo(tokenizer, settings, ""));
4699 c.analyseWholeProgram(*ctu, fileInfo, settings, *this); // TODO: check result
4700 while (!fileInfo.empty()) {
4701 delete fileInfo.back();
4702 fileInfo.pop_back();
4703 }
4704 delete ctu;
4705 }
4706
4707 void ctuTest() {
4708 setMultiline();

Callers

nothing calls this directly

Calls 6

getFileInfoFunction · 0.85
tokenizeMethod · 0.80
push_backMethod · 0.45
getFileInfoMethod · 0.45
analyseWholeProgramMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected