[clang] [Sema] -Wformat: warn about C23 %b %B when not in C23 language mode (PR #126694)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 11 07:54:39 PST 2025
================
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -std=c17 -DPRE_C23 -fsyntax-only -verify -isystem %S/Inputs %s
+// RUN: %clang_cc1 -std=c23 -DPOST_C23 -fsyntax-only -verify -isystem %S/Inputs %s
+
+#include <stdarg.h>
+#include <stddef.h>
+
+int printf(const char *restrict, ...);
+
+#if PRE_C23
----------------
AaronBallman wrote:
> I did not know about those options. I will try to change the test to work like that.
FWIW, we have some docs on this: https://clang.llvm.org/docs/InternalsManual.html#verifying-diagnostics
https://github.com/llvm/llvm-project/pull/126694
More information about the cfe-commits
mailing list