[clang] [clang-tools-extra] [clang] [diagnostics] Stable IDs for Clang diagnostics (PR #168153)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 15 05:08:12 PST 2025


================
@@ -1781,6 +1921,16 @@ void clang::EmitClangDiagsDefs(const RecordKeeper &Records, raw_ostream &OS,
 
     // Category number.
     OS << ", " << CategoryIDs.getID(getDiagnosticCategory(&R, DGParentMap));
+
+    // Stable ID.
+    uint32_t StableIDOffset = StableIDs.getStableIDOffset(R);
+    OS << ", " << StableIDOffset;
+
+    // Old Stable IDs.
----------------
steakhal wrote:

```suggestion
    // Previous Stable IDs.
```
Across the PR, this was referred by "Legacy" in the variable name, but as "Previous" in comments. I think I like this because "Previous" kinda explains why it's "Legacy", but let's not introduce the term "Old".

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


More information about the cfe-commits mailing list