[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

Nikolas Klauser via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 12 11:11:17 PDT 2024


================
@@ -269,11 +268,60 @@ CATEGORY(INSTALLAPI, REFACTORING)
   return Found;
 }
 
-DiagnosticMapping DiagnosticIDs::getDefaultMapping(unsigned DiagID) {
+//===----------------------------------------------------------------------===//
+// Custom Diagnostic information
+//===----------------------------------------------------------------------===//
+
+namespace clang {
+namespace diag {
+using CustomDiagDesc = DiagnosticIDs::CustomDiagDesc;
+class CustomDiagInfo {
+  std::vector<CustomDiagDesc> DiagInfo;
+  std::map<CustomDiagDesc, unsigned> DiagIDs;
+  std::map<diag::Group, std::vector<unsigned>> GroupToDiags;
----------------
philnik777 wrote:

Except for `GroupToDiags` this code is just moved, so IDK. 


https://github.com/llvm/llvm-project/pull/70976


More information about the cfe-commits mailing list