MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / checkInitializationListUsage_

Method checkInitializationListUsage_

test/testclass.cpp:8012–8022  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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"

Callers

nothing calls this directly

Calls 3

buildMethod · 0.80
tokenizeMethod · 0.80

Tested by

no test coverage detected