================
@@ -226,6 +227,10 @@ class SemaPPCallbacks : public PPCallbacks {
   }
   void PragmaDiagnostic(SourceLocation Loc, StringRef Namespace,
                         diag::Severity Mapping, StringRef Str) override {
+    // The pragma changed diagnostic severities; drop any cached analysis
+    // warning policies derived from the previous state.
+    S->AnalysisWarnings.clearPolicyCache();
+
     // If one of the analysis-based diagnostics was enabled while processing
----------------
AaronBallman wrote:

The code below is cache invalidation logic for analysis based warnings;  you're 
adding a new cache for analysis based warnings. Do we need both?

https://github.com/llvm/llvm-project/pull/212213
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to