Thank you for fixing this. Any updates here for the other two issues?
Thank you for fixing this. Any updates here for the other two issues?
Thank you for the fast response. cppcheck fails on one other parts too: - https://github.com/Viatorus/emio/blob/main/include/emio/detail/format/formatter.hpp#L793 <error id="internalAstError" severity="error" msg="Syntax Error: AST broken, binary operator '||' doesn't have two operands." verbose="Syntax Error: AST broken, binary operator '||' doesn't have two operands." file0="..."></error> What I also found out is, that cppcheck does not support __VA_OPT__. #define FOO(x, ...) call(x __VA_OPT__(,...
When using the following library/code: https://godbolt.org/z/8s33YjbWe cppchecks stops with a "syntaxError" without deeper explanation: <error id="syntaxError" severity="error" msg="syntax error" verbose="syntax error" file0="/builds/....cpp"> Since the code works well with clang-16, I tried to use cppcheck with the: --clang=clang-16 But than I get (for every file, unrelated tho the code): <error id="internalError" severity="error" msg="Bailing out from analysis: Processing Clang AST dump failed:...
Ah, I see, thank you. We are using CppCheck 1.9 at the moment. I double checked the issue with the online demo (http://cppcheck.sourceforge.net/demo/) but this seems to use also an older version.
Ah, I see, thank you. We are using CppCheck 1.9 at the moment. I double checked the issue with the online demo (http://cppcheck.sourceforge.net/demo/) but this seems to use also an older version.
Ah, I see. We are using CppCheck 1.9 at the moment. I double checked the issue with the online demo (http://cppcheck.sourceforge.net/demo/) but this seems to use also an older version.
The following code creates a false-positive: int* f() { auto* i = static_cast<int*>(malloc(1)); return i; } [test.cpp:4]: (portability) Returning an integer (int/long/etc) in a function with pointer return type is not portable across different platforms and compilers. The problem is, CppCheck tracks only the type of auto but not the complete type auto *