================
@@ -1202,6 +1202,30 @@ Clang also allows you to push and pop the current 
warning state. This is
 particularly useful when writing a header file that will be compiled by
 other people, because you don't know what warning flags they build with.
 
+Note that the following diagnostic groups, which are ones based on analyzing
----------------
AaronBallman wrote:

I may be misunderstanding your suggestion, but I think that would end up in the 
same place. We'd see the push, set the state on the function, see the pop, 
clear the state on the function (which we'd need to do for correctness since 
these can be placed arbitrarily, including nesting), then get to the `}` and 
have missed the fact that the pragma was enabled for the lines we wanted to 
diagnose.

Really, the only way around this behavior that I think works is to not skip 
analysis-based warnings if the diagnostic is disabled at the end of the 
function. But that has some significant compile-time overhead because these are 
CFG-based analyses.

https://github.com/llvm/llvm-project/pull/136323
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to