I've had an issue with the internal parser, for which I'll need to build a minimal example I can share. I've tried using the experimental clang parser but as soon as a standard header is included, I get the following error (both latest release and fresh build from master):
Another invalid AST location I've observed is invalid AST location: <<scratch space> [internalAstError]
The corresponding clang output seems to be mostly for system libraries:
Note that it works fine if I remove the #include <math.h> line.
I'm on debian 12, clang version is Debian clang version 14.0.6. I've built cppcheck from source, both latest master and latest release. Debian 12's cppcheck version is quite old and crashes regularly when used with --clang.
I've attached the output of both clang commands. Compressed, as sourceforge's spam protection triggers if I dont...
FYI --clang is still experimental so it should not be used in production. It is also magnitudes slower because it will always analyze the system headers involved (see https://trac.cppcheck.net/ticket/12376).
Greetings!
I've had an issue with the internal parser, for which I'll need to build a minimal example I can share. I've tried using the experimental clang parser but as soon as a standard header is included, I get the following error (both latest release and fresh build from master):
With helloworld.c being
Another invalid AST location I've observed is
invalid AST location: <<scratch space> [internalAstError]
The corresponding clang output seems to be mostly for system libraries:
I fail to build a minimal example, however, as this code:
makes cppcheck crash:
Note that it works fine if I remove the
#include <math.h>
line.I'm on debian 12, clang version is Debian clang version 14.0.6. I've built cppcheck from source, both latest master and latest release. Debian 12's cppcheck version is quite old and crashes regularly when used with
--clang
.I've attached the output of both clang commands. Compressed, as sourceforge's spam protection triggers if I dont...
FYI
--clang
is still experimental so it should not be used in production. It is also magnitudes slower because it will always analyze the system headers involved (see https://trac.cppcheck.net/ticket/12376).I filed https://trac.cppcheck.net/ticket/13834 and https://trac.cppcheck.net/ticket/13835 about the issues.
I also filed https://trac.cppcheck.net/ticket/13836.