| 352 | #define check(...) check_(__FILE__, __LINE__, __VA_ARGS__) |
| 353 | template<size_t size> |
| 354 | void check_(const char* file, int line, const char (&code)[size], const CheckOptions& opt = make_default_obj{}) { |
| 355 | // TODO: do not modify object passed into |
| 356 | Settings* settings; |
| 357 | if (!opt.settings) { |
| 358 | settings = &settings1; |
| 359 | } |
| 360 | else { |
| 361 | settings = opt.settings; |
| 362 | } |
| 363 | settings->certainty.setEnabled(Certainty::inconclusive, opt.inconclusive); |
| 364 | settings->verbose = opt.verbose; |
| 365 | |
| 366 | // Tokenize.. |
| 367 | SimpleTokenizer tokenizer(*settings, *this, opt.cpp); |
| 368 | ASSERT_LOC(tokenizer.tokenize(code), file, line); |
| 369 | |
| 370 | CheckOther check; |
| 371 | runChecks(check, tokenizer, *this); |
| 372 | } |
| 373 | |
| 374 | struct CheckPOptions |
| 375 | { |
nothing calls this directly
no test coverage detected