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

Method ctu_

test/testbufferoverrun.cpp:5359–5376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5357#define ctu(...) ctu_(__FILE__, __LINE__, __VA_ARGS__)
5358 template<size_t size>
5359 void ctu_(const char* file, int line, const char (&code)[size]) {
5360 // Tokenize..
5361 SimpleTokenizer tokenizer(settings0, *this);
5362 ASSERT_LOC(tokenizer.tokenize(code), file, line);
5363
5364 const CTU::FileInfo *ctu = CTU::getFileInfo(tokenizer);
5365
5366 std::list<const Check::FileInfo*> fileInfo;
5367 CheckBufferOverrun check;
5368 Check& c = getCheck(check);
5369 fileInfo.push_back(c.getFileInfo(tokenizer, settings0, ""));
5370 c.analyseWholeProgram(*ctu, fileInfo, settings0, *this); // TODO: check result
5371 while (!fileInfo.empty()) {
5372 delete fileInfo.back();
5373 fileInfo.pop_back();
5374 }
5375 delete ctu;
5376 }
5377
5378 void ctu_malloc() {
5379 ctu("void dostuff(char *p) {\n"

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