[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 11 08:21:58 PDT 2024
================
@@ -286,6 +334,18 @@ DiagnosticMapping DiagnosticIDs::getDefaultMapping(unsigned DiagID) {
return Info;
}
+void DiagnosticIDs::initCustomDiagMapping(DiagnosticMapping &Mapping,
+ unsigned DiagID) {
+ assert(IsCustomDiag(DiagID));
+ const auto &Diag = CustomDiagInfo->getDescription(DiagID);
+ if (auto Group = Diag.GetGroup()) {
+ auto GroupInfo = GroupInfos[static_cast<size_t>(*Group)];
----------------
AaronBallman wrote:
Not a good use of `auto` because the type is not particularly obvious from the initialization.
https://github.com/llvm/llvm-project/pull/70976
More information about the cfe-commits
mailing list