[clang] [clang] Catch missing format attributes (PR #70024)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 29 08:42:21 PDT 2024


================
@@ -0,0 +1,223 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <uchar.h>
+#include <wchar.h>
----------------
AaronBallman wrote:

Our test files should be hermetic and not rely on anything from the test system itself. `stdarg.h` is fine because we provide that as part of Clang, but the rest are all being pulled from the system. You should use forward declarations or other tricks so that these can be removed.

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


More information about the cfe-commits mailing list