================
@@ -0,0 +1,22 @@
+// RUN: %clang_cc1 -std=c++17 -Wno-all -Wunsafe-buffer-usage \
+// RUN:            -verify %s
+
+// Previously we had a bug where we would diagnose *no* unsafe buffer warnings
+// if the warning was disabled by pragma and left disabled until end-of-TU.
+// This is a reasonable way to disable unsafe buffer warnings on an entire
+// .c/cpp file, and it shouldn't disable the warnings in headers or previous
+// source locations, so we test that this works.
+
+// FIXME: This RUNX line should pass, but it does not, because we check if the
----------------
zmodem wrote:

This is unfortunate, but enabling warnings with pragmas seems much less common 
than ignoring them, so if we have to choose this seems better.

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

Reply via email to