================
@@ -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) || ...);
----------------
cor3ntin wrote:
```suggestion
return (!D.isIgnored(Diags, Loc) || ...);
```
I don't think using another function gives us much given how simple the
expression is
https://github.com/llvm/llvm-project/pull/136323
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits