Bug 490549 - clazy 1.12 does not compile with (the upcoming) clang 19
Summary: clazy 1.12 does not compile with (the upcoming) clang 19
Status: REPORTED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-20 10:25 UTC by Peter Klotz
Modified: 2024-10-25 08:05 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
A patch against clazy 1.12 (8.26 KB, text/plain)
2024-10-25 08:03 UTC, Peter Klotz
Details
A patch against clazy 1.13-20240928 (4.83 KB, text/plain)
2024-10-25 08:05 UTC, Peter Klotz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Klotz 2024-07-20 10:25:15 UTC
clazy 1.12 does not compile with clang 19 because the overridden method InclusionDirective() now has an additional parameter "bool ModuleImported".

Tested with a pre-release version of clang 19 (from the LLVM main branch) under Red Hat Enterprise Linux 9.

The compiler error message taken from the CMake build:

[  1%] Generating clazy.1
[  1%] Building CXX object CMakeFiles/ClazyPlugin.dir/cmake_pch.hxx.pch
[  1%] Built target man
In file included from <built-in>:1:
In file included from clazy/1.12/clazy-Binaries/CMakeFiles/ClazyPlugin.dir/cmake_pch.hxx:5:
clazy/1.12/clazy-1.12/src/checkbase.h:99:73: error: non-virtual member function marked 'override' hides virtual member function
   99 |                             clang::SrcMgr::CharacteristicKind FileType) override;
      |                                                                         ^
clang19el9/include/clang/Lex/PPCallbacks.h:168:16: note: hidden overloaded virtual function 'clang::PPCallbacks::InclusionDirective' declared here: different number of parameters (11 vs 10)
  168 |   virtual void InclusionDirective(SourceLocation HashLoc,
      |                ^
1 error generated.
make[2]: *** [CMakeFiles/ClazyPlugin.dir/build.make:77: CMakeFiles/ClazyPlugin.dir/cmake_pch.hxx.pch] Error 1
make[1]: *** [CMakeFiles/Makefile2:117: CMakeFiles/ClazyPlugin.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
Comment 1 Peter Klotz 2024-10-25 08:03:20 UTC
Created attachment 175214 [details]
A patch against clazy 1.12

This patch makes clazy 1.12 work together with clang 19.
Comment 2 Peter Klotz 2024-10-25 08:05:12 UTC
Created attachment 175215 [details]
A patch against clazy 1.13-20240928

This patch makes clazy 1.13-20240928 (git revision ef4fa16bf0df98404bfb8df449dfb88e8141840e) work together with clang 19.