File clazy-llvm20_2.patch of Package clazy
From ddf05137eecf9d126c914ee6a03c0c2f53c9948e Mon Sep 17 00:00:00 2001
From: Alexander Lohnau <alexander.lohnau@gmx.de>
Date: Sun, 30 Mar 2025 10:30:18 +0200
Subject: [PATCH] Add preprocessor if statement for method that is no longer in
clang20
https://invent.kde.org/sdk/clazy/-/issues/27
Test failures need to be adressed separately
---
src/FixItExporter.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/FixItExporter.cpp b/src/FixItExporter.cpp
index f4c14171..a6edcb25 100644
--- a/src/FixItExporter.cpp
+++ b/src/FixItExporter.cpp
@@ -191,7 +191,9 @@ void FixItExporter::Diag(SourceLocation Loc, unsigned DiagID)
// clear out any current diagnostic, and let the downstream client
// format the diagnostic.
DiagEngine.setClient(Client, false);
+#if LLVM_VERSION_MAJOR < 20
DiagEngine.Clear();
+#endif
DiagEngine.Report(Loc, DiagID);
DiagEngine.setClient(this, false);
}
--
GitLab