| 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" |
nothing calls this directly
no test coverage detected