| 114 | #define tok(...) tok_(__FILE__, __LINE__, __VA_ARGS__) |
| 115 | template<size_t size> |
| 116 | std::string tok_(const char* file, int line, const char (&code)[size], const TokOptions& options = make_default_obj()) { |
| 117 | const Settings settings = settingsBuilder(settings0).certainty(Certainty::inconclusive).debugwarnings(options.debugwarnings) |
| 118 | .platform(options.type).cpp(options.cppstd).build(); |
| 119 | |
| 120 | if (options.preprocess) { |
| 121 | SimpleTokenizer2 tokenizer(settings, *this, code, "test.cpp"); |
| 122 | |
| 123 | ASSERT_LOC(tokenizer.simplifyTokens1(""), file, line); |
| 124 | return tokenizer.tokens()->stringifyList(nullptr); |
| 125 | } |
| 126 | |
| 127 | SimpleTokenizer tokenizer(settings, *this); |
| 128 | ASSERT_LOC(tokenizer.tokenize(code), file, line); |
| 129 | |
| 130 | return tokenizer.tokens()->stringifyList(nullptr); |
| 131 | } |
| 132 | |
| 133 | void simplifyUsing1() { |
| 134 | const char code[] = "class A\n" |
nothing calls this directly
no test coverage detected