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

Method ctu_

test/testuninitvar.cpp:5574–5592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5572#define ctu(...) ctu_(__FILE__, __LINE__, __VA_ARGS__)
5573 template<size_t size>
5574 void ctu_(const char* file, int line, const char (&code)[size]) {
5575 // Tokenize..
5576 SimpleTokenizer tokenizer(settings, *this);
5577 ASSERT_LOC(tokenizer.tokenize(code), file, line);
5578
5579 const CTU::FileInfo *ctu = CTU::getFileInfo(tokenizer);
5580
5581 // Check code..
5582 std::list<const Check::FileInfo*> fileInfo;
5583 CheckUninitVar check;
5584 Check& c = getCheck(check);
5585 fileInfo.push_back(c.getFileInfo(tokenizer, settings, ""));
5586 c.analyseWholeProgram(*ctu, fileInfo, settings, *this); // TODO: check result
5587 while (!fileInfo.empty()) {
5588 delete fileInfo.back();
5589 fileInfo.pop_back();
5590 }
5591 delete ctu;
5592 }
5593
5594 void valueFlowUninitTest() {
5595 // #9735 - FN

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