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):
<errorid="internalError"severity="error"msg="Bailing out from analysis: Processing Clang AST dump failed: converting '' to integer failed - not an integer"verbose="Bailing out from analysis: Processing Clang AST dump failed: converting '' to integer failed - not an integer">
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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__(, ) __VA_ARGS__)
void call(int i, int j) {}
int main() {
FOO(1, 2);
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When using the following library/code: https://godbolt.org/z/8s33YjbWe
cppchecks stops with a "syntaxError" without deeper explanation:
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):
Thanks for reporting, see https://trac.cppcheck.net/ticket/11275
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__
.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?
C++20 issues are collected here: https://trac.cppcheck.net/ticket/10251