[clang] [C] Add (new) -Wimplicit-void-ptr-cast to -Wc++-compat (PR #136855)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 23 06:17:25 PDT 2025


================
@@ -0,0 +1,28 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wimplicit-void-ptr-cast %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wc++-compat %s
+// RUN: %clang_cc1 -fsyntax-only -verify=good %s
+// RUN: %clang_cc1 -fsyntax-only -verify=good -Wc++-compat -Wno-implicit-void-ptr-cast %s
+// good-no-diagnostics
+
+typedef __typeof__(sizeof(int)) size_t;
+extern void *malloc(size_t);
+
+void func(int *); // expected-note {{passing argument to parameter here}}
----------------
erichkeane wrote:

This is the perfect time to use bookmarks.

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


More information about the cfe-commits mailing list