| 8010 | #define checkInitializationListUsage(...) checkInitializationListUsage_(__FILE__, __LINE__, __VA_ARGS__) |
| 8011 | template<size_t size> |
| 8012 | void checkInitializationListUsage_(const char* file, int line, const char (&code)[size]) { |
| 8013 | // Check.. |
| 8014 | const Settings settings = settingsBuilder().severity(Severity::performance).build(); |
| 8015 | |
| 8016 | // Tokenize.. |
| 8017 | SimpleTokenizer tokenizer(settings, *this); |
| 8018 | ASSERT_LOC(tokenizer.tokenize(code), file, line); |
| 8019 | |
| 8020 | CheckClassImpl checkClass(&tokenizer, settings, *this); |
| 8021 | checkClass.initializationListUsage(); |
| 8022 | } |
| 8023 | |
| 8024 | void initializerListUsage() { |
| 8025 | checkInitializationListUsage("enum Enum { C = 0 };\n" |
nothing calls this directly
no test coverage detected