| 152 | } |
| 153 | |
| 154 | void notokens() { |
| 155 | // analyzing /usr/include/poll.h caused Path::identify() to be called with an empty filename from |
| 156 | // TokenList::determineCppC() because there are no tokens |
| 157 | const char code[] = "#include <sys/poll.h>"; |
| 158 | std::vector<std::string> files; |
| 159 | simplecpp::TokenList tokens1(code, files, "poll.h", nullptr); |
| 160 | Preprocessor preprocessor(tokens1, settingsDefault, *this, Path::identify(tokens1.getFiles()[0], false)); |
| 161 | simplecpp::OutputList outputList_pp; |
| 162 | simplecpp::TokenList tokensP = preprocessor.preprocess("", files, outputList_pp); |
| 163 | ASSERT(!preprocessor.reportOutput(outputList_pp, true)); |
| 164 | TokenList tokenlist(settingsDefault, Standards::Language::C); // headers are treated as C files |
| 165 | tokenlist.createTokens(std::move(tokensP)); // do not assert |
| 166 | } |
| 167 | |
| 168 | void ast1() const { |
| 169 | const char code[] = "('Release|x64' == 'Release|x64');"; |
nothing calls this directly
no test coverage detected