[clang] Control analysis-based diagnostics with #pragma (PR #136323)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 18 10:48:11 PDT 2025
================
@@ -2493,35 +2493,44 @@ class sema::AnalysisBasedWarnings::InterProceduralData {
CalledOnceInterProceduralData CalledOnceData;
};
-static unsigned isEnabled(DiagnosticsEngine &D, unsigned diag) {
- return (unsigned)!D.isIgnored(diag, SourceLocation());
+static bool isEnabledImpl(DiagnosticsEngine &D, SourceLocation Loc,
+ unsigned Diag) {
+ return !D.isIgnored(Diag, Loc);
}
+template <typename... Ts>
+static bool isEnabled(DiagnosticsEngine &D, SourceLocation Loc, Ts... Diags) {
+ return (isEnabledImpl(D, Loc, Diags) || ...);
----------------
AaronBallman wrote:
Heh fair point, I'll adjust this.
https://github.com/llvm/llvm-project/pull/136323
More information about the cfe-commits
mailing list