RFR: 8367051: Build failure with clang on linux and AIX after switch to C++17
Julian Waters
jwaters at openjdk.org
Wed Sep 10 08:41:43 UTC 2025
On Wed, 10 Sep 2025 07:11:53 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
> > Seems like a good reminder for me to resume working on that static analyzer as soon as possible.
>
> What static analyzer you are referring to ? We support now the gcc static analyzer in OpenJDK ( https://bugs.openjdk.org/browse/JDK-8362516 ) but probably you mean something different. (there is also a static code analyzer in clang named scan-build https://clang.llvm.org/docs/analyzer/user-docs/CommandLineUsage.html#scan-build which has some pros compared to the gcc static analyzer like C++ support and 'nice' html code result generation; but on the other hand it seemed to me that it generates even more false positive findings compared to the GCC static analyzer) .
I was halfway through writing a custom C++17 static analyzer for HotSpot that can enforce the HotSpot code style. The existing static analyzers in gcc and clang unfortunately don't seem to support things that we need (Like forbidding functions or the NULL macro). I got stuck on the Lexer and halted work on it for a while, so it'll probably be good if I could continue working on it soon. Another plus is that it might be able to enforce things that the compilers we use cannot (Like prohibiting certain C++ headers or how headers are included with angle brackets or quotes)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27154#issuecomment-3273929148
More information about the hotspot-dev
mailing list