I have a file that can be summarized as shown below.
namespace MyNamespace {
#if defined(SOME_UNSET_CONDITION)
TEST_CASE("STR1", "[STR2]") {
}
TEST_CASE("STR3", "[STR4]") {
}
#endif
}
When calling Cppcheck v2.8 on the file, the following is the output:
$ cppcheck --std=c++14 -v tmp.cpp
Checking tmp.cpp ...
Defines:
Undefines:
Includes:
Platform:Native
Checking tmp.cpp: SOME_UNSET_CONDITION...
tmp.cpp:8:1: error: syntax error [syntaxError]
TEST_CASE("STR3", "[STR4]") {
^
The SOME_UNSENT_CONDITION
directive is not currently enabled in this project, though I'm not sure why cppcheck
would be complaining either way. Can anyone give me some insight here?