diff --git a/lib/platform.h b/lib/platform.h index 76fc87b55..4376543ec 100644 --- a/lib/platform.h +++ b/lib/platform.h @@ -24,6 +24,7 @@ #include "config.h" #include +#include #include #include @@ -149,9 +150,9 @@ namespace cppcheck { static const char *platformString(PlatformType pt) { switch (pt) { case Unspecified: - return "Unspecified"; + return "unspecified"; case Native: - return "Native"; + return "native"; case Win32A: return "win32A"; case Win32W: @@ -165,7 +166,7 @@ namespace cppcheck { case PlatformFile: return "platformFile"; default: - return "unknown"; + throw std::runtime_error("unknown platform"); } } diff --git a/test/fixture.h b/test/fixture.h index 5fb3b0eee..4daf02b92 100644 --- a/test/fixture.h +++ b/test/fixture.h @@ -141,6 +141,7 @@ extern std::ostringstream errout; // NOLINTNEXTLINE(readability-redundant-declaration) extern std::ostringstream output; +// TODO: most asserts do not actually assert i.e. do not return #define TEST_CASE( NAME ) do { if (prepareTest(#NAME)) { setVerbose(false); NAME(); } } while (false) #define ASSERT( CONDITION ) if (!assert_(__FILE__, __LINE__, (CONDITION))) return #define ASSERT_LOC( CONDITION, FILE_, LINE_ ) assert_(FILE_, LINE_, (CONDITION)) @@ -165,4 +166,6 @@ extern std::ostringstream output; } \ } while (false) +#define PLATFORM( S, P ) do { std::string errstr; assertEquals(__FILE__, __LINE__, true, S.platform(cppcheck::Platform::platformString(P), errstr, {exename}), errstr); } while (false) + #endif // fixtureH diff --git a/test/testcharvar.cpp b/test/testcharvar.cpp index 2638ba391..79f72ec20 100644 --- a/test/testcharvar.cpp +++ b/test/testcharvar.cpp @@ -34,7 +34,7 @@ private: Settings settings; void run() override { - settings.platform(Settings::Unspecified); + PLATFORM(settings, Settings::Unspecified); settings.severity.enable(Severity::warning); settings.severity.enable(Severity::portability); diff --git a/test/testclangimport.cpp b/test/testclangimport.cpp index e0659e391..9b2033168 100644 --- a/test/testclangimport.cpp +++ b/test/testclangimport.cpp @@ -1052,10 +1052,15 @@ private: #define GET_SYMBOL_DB(AST) \ Settings settings; \ settings.clang = true; \ - settings.platform(cppcheck::Platform::PlatformType::Unix64); \ + { \ + std::string errstr; \ + ASSERT_EQUALS_MSG(true, settings.platform("unix64", errstr, {exename.c_str()}), errstr); \ + } \ Tokenizer tokenizer(&settings, this); \ - std::istringstream istr(AST); \ - clangimport::parseClangAstDump(&tokenizer, istr); \ + { \ + std::istringstream istr(AST); \ + clangimport::parseClangAstDump(&tokenizer, istr); \ + } \ const SymbolDatabase *db = tokenizer.getSymbolDatabase(); \ ASSERT(db) diff --git a/test/testcondition.cpp b/test/testcondition.cpp index 7d343db4b..f5da61c95 100644 --- a/test/testcondition.cpp +++ b/test/testcondition.cpp @@ -45,8 +45,8 @@ private: void run() override { // known platform.. - settings0.platform(cppcheck::Platform::PlatformType::Native); - settings1.platform(cppcheck::Platform::PlatformType::Native); + PLATFORM(settings0, cppcheck::Platform::Native); + PLATFORM(settings1, cppcheck::Platform::Native); LOAD_LIB_2(settings0.library, "qt.cfg"); LOAD_LIB_2(settings0.library, "std.cfg"); @@ -5580,7 +5580,7 @@ private: void compareOutOfTypeRange() { Settings settingsUnix64; settingsUnix64.severity.enable(Severity::style); - settingsUnix64.platform(cppcheck::Platform::PlatformType::Unix64); + PLATFORM(settingsUnix64, cppcheck::Platform::PlatformType::Unix64); check("void f(unsigned char c) {\n" " if (c == 256) {}\n" diff --git a/test/testfilelister.cpp b/test/testfilelister.cpp index fb235fa65..9efcc9661 100644 --- a/test/testfilelister.cpp +++ b/test/testfilelister.cpp @@ -37,8 +37,10 @@ private: // bail out if the tests are not executed from the base folder { std::ifstream fin("test/testfilelister.cpp"); - if (!fin.is_open()) + if (!fin.is_open()) { + // TODO: log return; + } } TEST_CASE(isDirectory); diff --git a/test/testio.cpp b/test/testio.cpp index d3ded3446..6ea13feb8 100644 --- a/test/testio.cpp +++ b/test/testio.cpp @@ -94,7 +94,7 @@ private: if (portability) settings.severity.enable(Severity::portability); settings.certainty.setEnabled(Certainty::inconclusive, inconclusive); - settings.platform(platform); + PLATFORM(settings, platform); // Tokenize.. Tokenizer tokenizer(&settings, this); diff --git a/test/testother.cpp b/test/testother.cpp index d26e5a318..705ed5012 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -1991,7 +1991,7 @@ private: ASSERT_EQUALS("", errout.str()); Settings settings1; - settings1.platform(Settings::Win64); + PLATFORM(settings1, cppcheck::Platform::Win64); check("using ui64 = unsigned __int64;\n" "ui64 Test(ui64 one, ui64 two) { return one + two; }\n", /*filename*/ nullptr, /*experimental*/ false, /*inconclusive*/ true, /*runSimpleChecks*/ true, /*verbose*/ false, &settings1); @@ -2137,12 +2137,12 @@ private: "void f(X x) {}"; Settings s32(_settings); - s32.platform(cppcheck::Platform::Unix32); + PLATFORM(s32, cppcheck::Platform::Unix32); check(code, &s32); ASSERT_EQUALS("[test.cpp:5]: (performance) Function parameter 'x' should be passed by const reference.\n", errout.str()); Settings s64(_settings); - s64.platform(cppcheck::Platform::Unix64); + PLATFORM(s64, cppcheck::Platform::Unix64); check(code, &s64); ASSERT_EQUALS("", errout.str()); } @@ -7421,7 +7421,7 @@ private: // #9040 Settings settings1; - settings1.platform(Settings::Win64); + PLATFORM(settings1, cppcheck::Platform::Win64); check("using BOOL = unsigned;\n" "int i;\n" "bool f() {\n" diff --git a/test/testplatform.cpp b/test/testplatform.cpp index 8c37ed72b..409b636cb 100644 --- a/test/testplatform.cpp +++ b/test/testplatform.cpp @@ -29,8 +29,11 @@ public: private: void run() override { TEST_CASE(empty); - TEST_CASE(valid_config_native_1); - TEST_CASE(valid_config_native_2); + TEST_CASE(valid_config_win32a); + TEST_CASE(valid_config_unix64); + TEST_CASE(valid_config_win32w); + TEST_CASE(valid_config_unix32); + TEST_CASE(valid_config_win64); TEST_CASE(valid_config_file_1); TEST_CASE(valid_config_file_2); TEST_CASE(valid_config_file_3); @@ -50,50 +53,133 @@ private: // An empty platform file does not change values, only the type. const char xmldata[] = "\n"; cppcheck::Platform platform; - ASSERT(platform.platform(cppcheck::Platform::Win64)); - ASSERT(readPlatform(platform, xmldata)); - ASSERT_EQUALS(cppcheck::Platform::PlatformFile, platform.platformType); - ASSERT(!platform.isWindowsPlatform()); - ASSERT_EQUALS(8, platform.char_bit); - ASSERT_EQUALS('\0', platform.defaultSign); - ASSERT_EQUALS(1, platform.sizeof_bool); - ASSERT_EQUALS(2, platform.sizeof_short); - ASSERT_EQUALS(4, platform.sizeof_int); - ASSERT_EQUALS(4, platform.sizeof_long); - ASSERT_EQUALS(8, platform.sizeof_long_long); + // TODO: this should fail - platform files need to be complete + TODO_ASSERT(!readPlatform(platform, xmldata)); } - void valid_config_native_1() const { + void valid_config_win32a() const { // Verify if native Win32A platform is loaded correctly cppcheck::Platform platform; - ASSERT(platform.platform(cppcheck::Platform::Win32A)); + PLATFORM(platform, cppcheck::Platform::Win32A); ASSERT_EQUALS(cppcheck::Platform::Win32A, platform.platformType); ASSERT(platform.isWindowsPlatform()); - ASSERT_EQUALS('\0', platform.defaultSign); - ASSERT_EQUALS(8, platform.char_bit); ASSERT_EQUALS(1, platform.sizeof_bool); ASSERT_EQUALS(2, platform.sizeof_short); ASSERT_EQUALS(4, platform.sizeof_int); ASSERT_EQUALS(4, platform.sizeof_long); ASSERT_EQUALS(8, platform.sizeof_long_long); + ASSERT_EQUALS(4, platform.sizeof_float); + ASSERT_EQUALS(8, platform.sizeof_double); + ASSERT_EQUALS(8, platform.sizeof_long_double); + ASSERT_EQUALS(2, platform.sizeof_wchar_t); + ASSERT_EQUALS(4, platform.sizeof_size_t); + ASSERT_EQUALS(4, platform.sizeof_pointer); + ASSERT_EQUALS('\0', platform.defaultSign); + ASSERT_EQUALS(8, platform.char_bit); ASSERT_EQUALS(16, platform.short_bit); ASSERT_EQUALS(32, platform.int_bit); ASSERT_EQUALS(32, platform.long_bit); ASSERT_EQUALS(64, platform.long_long_bit); } - void valid_config_native_2() const { + void valid_config_unix64() const { // Verify if native Unix64 platform is loaded correctly cppcheck::Platform platform; - ASSERT(platform.platform(cppcheck::Platform::Unix64)); + PLATFORM(platform, cppcheck::Platform::Unix64); ASSERT_EQUALS(cppcheck::Platform::Unix64, platform.platformType); ASSERT(!platform.isWindowsPlatform()); + ASSERT_EQUALS(1, platform.sizeof_bool); + ASSERT_EQUALS(2, platform.sizeof_short); + ASSERT_EQUALS(4, platform.sizeof_int); + ASSERT_EQUALS(8, platform.sizeof_long); + ASSERT_EQUALS(8, platform.sizeof_long_long); + ASSERT_EQUALS(4, platform.sizeof_float); + ASSERT_EQUALS(8, platform.sizeof_double); + ASSERT_EQUALS(16, platform.sizeof_long_double); + ASSERT_EQUALS(4, platform.sizeof_wchar_t); + ASSERT_EQUALS(8, platform.sizeof_size_t); + ASSERT_EQUALS(8, platform.sizeof_pointer); ASSERT_EQUALS('\0', platform.defaultSign); ASSERT_EQUALS(8, platform.char_bit); - ASSERT_EQUALS(4, platform.sizeof_int); + ASSERT_EQUALS(16, platform.short_bit); ASSERT_EQUALS(32, platform.int_bit); - ASSERT_EQUALS(8, platform.sizeof_long); ASSERT_EQUALS(64, platform.long_bit); + ASSERT_EQUALS(64, platform.long_long_bit); + } + + void valid_config_win32w() const { + // Verify if native Win32W platform is loaded correctly + cppcheck::Platform platform; + PLATFORM(platform, cppcheck::Platform::Win32W); + ASSERT_EQUALS(cppcheck::Platform::Win32W, platform.platformType); + ASSERT(platform.isWindowsPlatform()); + ASSERT_EQUALS(1, platform.sizeof_bool); + ASSERT_EQUALS(2, platform.sizeof_short); + ASSERT_EQUALS(4, platform.sizeof_int); + ASSERT_EQUALS(4, platform.sizeof_long); + ASSERT_EQUALS(8, platform.sizeof_long_long); + ASSERT_EQUALS(4, platform.sizeof_float); + ASSERT_EQUALS(8, platform.sizeof_double); + ASSERT_EQUALS(8, platform.sizeof_long_double); + ASSERT_EQUALS(2, platform.sizeof_wchar_t); + ASSERT_EQUALS(4, platform.sizeof_size_t); + ASSERT_EQUALS(4, platform.sizeof_pointer); + ASSERT_EQUALS('\0', platform.defaultSign); + ASSERT_EQUALS(8, platform.char_bit); + ASSERT_EQUALS(16, platform.short_bit); + ASSERT_EQUALS(32, platform.int_bit); + ASSERT_EQUALS(32, platform.long_bit); + ASSERT_EQUALS(64, platform.long_long_bit); + } + + void valid_config_unix32() const { + // Verify if native Unix32 platform is loaded correctly + cppcheck::Platform platform; + PLATFORM(platform, cppcheck::Platform::Unix32); + ASSERT_EQUALS(cppcheck::Platform::Unix32, platform.platformType); + ASSERT(!platform.isWindowsPlatform()); + ASSERT_EQUALS(1, platform.sizeof_bool); + ASSERT_EQUALS(2, platform.sizeof_short); + ASSERT_EQUALS(4, platform.sizeof_int); + ASSERT_EQUALS(4, platform.sizeof_long); + ASSERT_EQUALS(8, platform.sizeof_long_long); + ASSERT_EQUALS(4, platform.sizeof_float); + ASSERT_EQUALS(8, platform.sizeof_double); + ASSERT_EQUALS(12, platform.sizeof_long_double); + ASSERT_EQUALS(4, platform.sizeof_wchar_t); + ASSERT_EQUALS(4, platform.sizeof_size_t); + ASSERT_EQUALS(4, platform.sizeof_pointer); + ASSERT_EQUALS('\0', platform.defaultSign); + ASSERT_EQUALS(8, platform.char_bit); + ASSERT_EQUALS(16, platform.short_bit); + ASSERT_EQUALS(32, platform.int_bit); + ASSERT_EQUALS(32, platform.long_bit); + ASSERT_EQUALS(64, platform.long_long_bit); + } + + void valid_config_win64() const { + // Verify if native Win64 platform is loaded correctly + cppcheck::Platform platform; + PLATFORM(platform, cppcheck::Platform::Win64); + ASSERT_EQUALS(cppcheck::Platform::Win64, platform.platformType); + ASSERT(platform.isWindowsPlatform()); + ASSERT_EQUALS(1, platform.sizeof_bool); + ASSERT_EQUALS(2, platform.sizeof_short); + ASSERT_EQUALS(4, platform.sizeof_int); + ASSERT_EQUALS(4, platform.sizeof_long); + ASSERT_EQUALS(8, platform.sizeof_long_long); + ASSERT_EQUALS(4, platform.sizeof_float); + ASSERT_EQUALS(8, platform.sizeof_double); + ASSERT_EQUALS(8, platform.sizeof_long_double); + ASSERT_EQUALS(2, platform.sizeof_wchar_t); + ASSERT_EQUALS(8, platform.sizeof_size_t); + ASSERT_EQUALS(8, platform.sizeof_pointer); + ASSERT_EQUALS('\0', platform.defaultSign); + ASSERT_EQUALS(8, platform.char_bit); + ASSERT_EQUALS(16, platform.short_bit); + ASSERT_EQUALS(32, platform.int_bit); + ASSERT_EQUALS(32, platform.long_bit); + ASSERT_EQUALS(64, platform.long_long_bit); } void valid_config_file_1() { @@ -184,7 +270,7 @@ private: ASSERT_EQUALS(100, platform.long_long_bit); } - void valid_config_file_3() { + void valid_config_file_3() const { // Valid platform configuration without any usable information. // Similar like an empty file. const char xmldata[] = "\n" @@ -206,17 +292,8 @@ private: " \n" " "; cppcheck::Platform platform; - ASSERT(platform.platform(cppcheck::Platform::Win64)); - ASSERT(readPlatform(platform, xmldata)); - ASSERT_EQUALS(platform.PlatformFile, platform.platformType); - ASSERT(!platform.isWindowsPlatform()); - ASSERT_EQUALS(8, platform.char_bit); - ASSERT_EQUALS('\0', platform.defaultSign); - ASSERT_EQUALS(1, platform.sizeof_bool); - ASSERT_EQUALS(2, platform.sizeof_short); - ASSERT_EQUALS(4, platform.sizeof_int); - ASSERT_EQUALS(4, platform.sizeof_long); - ASSERT_EQUALS(8, platform.sizeof_long_long); + // TODO: needs to fail - files need to be complete + TODO_ASSERT(!readPlatform(platform, xmldata)); } void valid_config_file_4() { @@ -287,7 +364,7 @@ private: ASSERT(!readPlatform(platform, xmldata)); } - void empty_elements() { + void empty_elements() const { // Valid platform configuration without any usable information. // Similar like an empty file. const char xmldata[] = "\n" @@ -309,10 +386,7 @@ private: " \n" " "; cppcheck::Platform platform; - ASSERT(platform.platform(cppcheck::Platform::Win64)); ASSERT(!readPlatform(platform, xmldata)); - ASSERT_EQUALS(platform.PlatformFile, platform.platformType); - ASSERT(!platform.isWindowsPlatform()); } void default_platform() { diff --git a/test/testpreprocessor.cpp b/test/testpreprocessor.cpp index ed7776e1d..6cfafff15 100644 --- a/test/testpreprocessor.cpp +++ b/test/testpreprocessor.cpp @@ -480,12 +480,12 @@ private: simplecpp::TokenList tokens(istr, files, "test.c"); // preprocess code with unix32 platform.. - settings.platform(Settings::PlatformType::Unix32); + PLATFORM(settings, Settings::PlatformType::Unix32); preprocessor.setPlatformInfo(&tokens); ASSERT_EQUALS("\n1", preprocessor.getcode(tokens, "", files, false)); // preprocess code with unix64 platform.. - settings.platform(Settings::PlatformType::Unix64); + PLATFORM(settings, Settings::PlatformType::Unix64); preprocessor.setPlatformInfo(&tokens); ASSERT_EQUALS("\n\n\n2", preprocessor.getcode(tokens, "", files, false)); } diff --git a/test/testsimplifytemplate.cpp b/test/testsimplifytemplate.cpp index 75b5afc94..f60bf9522 100644 --- a/test/testsimplifytemplate.cpp +++ b/test/testsimplifytemplate.cpp @@ -313,7 +313,7 @@ private: errout.str(""); settings.debugwarnings = debugwarnings; - settings.platform(type); + PLATFORM(settings, type); Tokenizer tokenizer(&settings, this); std::istringstream istr(code); diff --git a/test/testsimplifytokens.cpp b/test/testsimplifytokens.cpp index 670bd3a75..8eefc0bd2 100644 --- a/test/testsimplifytokens.cpp +++ b/test/testsimplifytokens.cpp @@ -178,7 +178,7 @@ private: std::string tok_(const char* file, int line, const char code[], bool simplify = true, Settings::PlatformType type = Settings::Native) { errout.str(""); - settings0.platform(type); + PLATFORM(settings0, type); Tokenizer tokenizer(&settings0, this); std::istringstream istr(code); @@ -207,7 +207,7 @@ private: errout.str(""); settings1.debugwarnings = true; - settings1.platform(platform); + PLATFORM(settings1, platform); settings1.standards.cpp = cpp11 ? Standards::CPP11 : Standards::CPP03; // tokenize.. diff --git a/test/testsimplifytypedef.cpp b/test/testsimplifytypedef.cpp index 6b7f8cbe7..5f24c36ea 100644 --- a/test/testsimplifytypedef.cpp +++ b/test/testsimplifytypedef.cpp @@ -214,7 +214,7 @@ private: settings0.certainty.enable(Certainty::inconclusive); settings0.debugwarnings = debugwarnings; // show warnings about unhandled typedef - settings0.platform(type); + PLATFORM(settings0, type); Tokenizer tokenizer(&settings0, this); std::istringstream istr(code); diff --git a/test/testsimplifyusing.cpp b/test/testsimplifyusing.cpp index 45087de86..8b2374ade 100644 --- a/test/testsimplifyusing.cpp +++ b/test/testsimplifyusing.cpp @@ -103,7 +103,7 @@ private: settings0.certainty.enable(Certainty::inconclusive); settings0.debugwarnings = debugwarnings; - settings0.platform(type); + PLATFORM(settings0, type); Tokenizer tokenizer(&settings0, this); std::istringstream istr(code); diff --git a/test/testsymboldatabase.cpp b/test/testsymboldatabase.cpp index 623da2a79..839ff37ab 100644 --- a/test/testsymboldatabase.cpp +++ b/test/testsymboldatabase.cpp @@ -120,7 +120,7 @@ private: void run() override { LOAD_LIB_2(settings1.library, "std.cfg"); - settings2.platform(Settings::Unspecified); + PLATFORM(settings2, cppcheck::Platform::Unspecified); // If there are unused templates, keep those settings1.checkUnusedTemplates = true; diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index edd8a00a7..d6e814d7d 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -472,7 +472,7 @@ private: errout.str(""); settings1.debugwarnings = true; - settings1.platform(platform); + PLATFORM(settings1, platform); settings1.standards.cpp = std; // tokenize.. @@ -501,7 +501,7 @@ private: errout.str(""); settings_windows.debugwarnings = true; - settings_windows.platform(platform); + PLATFORM(settings_windows, platform); settings_windows.standards.cpp = cpp11 ? Standards::CPP11 : Standards::CPP03; // tokenize.. diff --git a/test/testtype.cpp b/test/testtype.cpp index 7e371c5f1..7a4430b1c 100644 --- a/test/testtype.cpp +++ b/test/testtype.cpp @@ -67,7 +67,7 @@ private: void checkTooBigShift_Unix32() { Settings settings; - settings.platform(Settings::Unix32); + PLATFORM(settings, Settings::Unix32); // unsigned types getting promoted to int sizeof(int) = 4 bytes // and unsigned types having already a size of 4 bytes @@ -241,7 +241,7 @@ private: void checkIntegerOverflow() { Settings settings; - settings.platform(Settings::Unix32); + PLATFORM(settings, Settings::Unix32); settings.severity.enable(Severity::warning); check("x = (int)0x10000 * (int)0x10000;", &settings); @@ -283,7 +283,7 @@ private: void signConversion() { Settings settings; - settings.platform(Settings::Unix64); + PLATFORM(settings, Settings::Unix64); check("x = -4 * (unsigned)y;"); ASSERT_EQUALS("[test.cpp:1]: (warning) Expression '-4' has a negative value. That is converted to an unsigned value and used in an unsigned calculation.\n", errout.str()); @@ -334,7 +334,7 @@ private: void longCastAssign() { Settings settings; settings.severity.enable(Severity::style); - settings.platform(Settings::Unix64); + PLATFORM(settings, Settings::Unix64); check("long f(int x, int y) {\n" " const long ret = x * y;\n" diff --git a/test/testunusedfunctions.cpp b/test/testunusedfunctions.cpp index c23a80a5e..232845d04 100644 --- a/test/testunusedfunctions.cpp +++ b/test/testunusedfunctions.cpp @@ -83,7 +83,7 @@ private: // Clear the error buffer.. errout.str(""); - settings.platform(platform); + PLATFORM(settings, platform); // Tokenize.. Tokenizer tokenizer(&settings, this); diff --git a/test/testunusedprivfunc.cpp b/test/testunusedprivfunc.cpp index c7bc51c40..5382ac513 100644 --- a/test/testunusedprivfunc.cpp +++ b/test/testunusedprivfunc.cpp @@ -96,7 +96,7 @@ private: // Clear the error buffer.. errout.str(""); - settings.platform(platform); + PLATFORM(settings, platform); // Raw tokens.. std::vector files(1, "test.cpp"); diff --git a/test/testvalueflow.cpp b/test/testvalueflow.cpp index 3c8f86f54..3e095b989 100644 --- a/test/testvalueflow.cpp +++ b/test/testvalueflow.cpp @@ -989,7 +989,7 @@ private: // ~ code = "x = ~0U;"; - settings.platform(cppcheck::Platform::Native); // ensure platform is native + PLATFORM(settings, cppcheck::Platform::Native); // ensure platform is native values = tokenValues(code,"~"); ASSERT_EQUALS(1U, values.size()); ASSERT_EQUALS(~0U, values.back().intvalue); diff --git a/test/testvarid.cpp b/test/testvarid.cpp index 4d557ba68..9c8aa5d9b 100644 --- a/test/testvarid.cpp +++ b/test/testvarid.cpp @@ -33,7 +33,7 @@ struct InternalError; class TestVarID : public TestFixture { public: TestVarID() : TestFixture("TestVarID") { - settings.platform(Settings::Unix64); + PLATFORM(settings, cppcheck::Platform::Unix64); settings.standards.c = Standards::C89; settings.standards.cpp = Standards::CPPLatest; settings.checkUnusedTemplates = true;