================
@@ -962,6 +962,17 @@ class DiagnosticsEngine : public
RefCountedBase<DiagnosticsEngine> {
diag::Severity::Ignored;
}
+ bool areAllIgnored(StringRef Group, SourceLocation Loc) const {
+ llvm::SmallVector<diag::kind> diagsInGroup;
+ bool Failed = Diags->getDiagnosticsInGroup(diag::Flavor::WarningOrError,
+ Group, diagsInGroup);
+ assert(!Failed && "Incorrect group name?");
+ (void)Failed;
+ return llvm::all_of(diagsInGroup, [&](diag::kind DiagID) {
----------------
erichkeane wrote:
Hmm... GetDiagStateForLoc is actually more expensive than I'd hoped, it is a
full map lookup, so this could get bad for larger diagnostic groups. I'll have
to think about how I want to do this in a way that reuses all of that.
https://github.com/llvm/llvm-project/pull/206820
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits