Looks like CppCheck doesn’t understand “enum class” in headr file.
It reports as Severity: (error) with ErrorMessage: [syntaxError] syntax error [cppCheck]
This is reported with latest version 26. The language argument is already set to c++ (--language=c++)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Daniel, Cppcheck team,
Greetings!
This issue seems to repro on released version 2.6 and the latest 2.7 aswell.
Is there any way to get more detail as to what cppcheck does not like about the syntax. This looks a false-positive. It would help if some one from Cppcheck team get some attention on this [syntaxError] cppCheck issue?
Any ETA when this would be resolved.
Last edit: Siva Ramaraju 2022-03-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there a typedef with the same name as one of the enum values? There was a recent fix for that: https://github.com/danmar/cppcheck/pull/3867
There could also be a conflicting define in a library .cfg file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The CppCheck syntax error in xLogger.h:90 is a bug in CppCheck. It doesn’t understand “enum class”.
private:
friend struct Log;
enum class Level
{
NONE,
VERBOSE,
DEBUG,
INFO,
WARNING,
ERROR,
CRITICAL
};
Looks like CppCheck doesn’t understand “enum class” in headr file.
It reports as Severity: (error) with ErrorMessage: [syntaxError] syntax error [cppCheck]
This is reported with latest version 26. The language argument is already set to c++ (--language=c++)
Hi Daniel, Cppcheck team,
Greetings!
This issue seems to repro on released version 2.6 and the latest 2.7 aswell.
Is there any way to get more detail as to what cppcheck does not like about the syntax. This looks a false-positive. It would help if some one from Cppcheck team get some attention on this [syntaxError] cppCheck issue?
Any ETA when this would be resolved.
Last edit: Siva Ramaraju 2022-03-07
Is there a typedef with the same name as one of the enum values? There was a recent fix for that: https://github.com/danmar/cppcheck/pull/3867
There could also be a conflicting define in a library .cfg file.