================
@@ -434,6 +478,30 @@ StringRef DiagnosticIDs::getDescription(unsigned DiagID)
const {
return CustomDiagInfo->getDescription(DiagID).GetDescription();
}
+/// getStableID - Given a diagnostic ID, return the stable ID of the
diagnostic.
+std::string DiagnosticIDs::getStableID(unsigned DiagID) const {
+ if (const StaticDiagInfoRec *Info = GetDiagInfo(DiagID))
+ return Info->getStableID().str();
+ assert(CustomDiagInfo && "Invalid CustomDiagInfo");
----------------
dbartol wrote:
I had a colleague double-check my logic here, and he concurred with my
reasoning. I'm going to merge based on your conditional approval, but do ping
me if there's something you want me to follow up on.
https://github.com/llvm/llvm-project/pull/168153
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits