[clang] [clang] Remove outdated parts of documentation for #pragma diagnostic (PR #78095)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 15 07:42:22 PST 2024


================
@@ -1157,19 +1156,16 @@ existed.
   #if foo
   #endif foo // warning: extra tokens at end of #endif directive
 
-  #pragma clang diagnostic push
-  #pragma clang diagnostic ignored "-Wextra-tokens"
+  #pragma GCC diagnostic push
+  #pragma GCC diagnostic ignored "-Wextra-tokens"
 
   #if foo
   #endif foo // no warning
 
-  #pragma clang diagnostic pop
+  #pragma GCC diagnostic pop
----------------
AaronBallman wrote:

I think we want to mention that `#pragma clang diagnostic` also exists so that users know what it is when they come across it and how it differs from `#pragma GCC diagnostic` in terms of extra functionality. WDYT?

https://github.com/llvm/llvm-project/pull/78095


More information about the cfe-commits mailing list