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