[clang] Improve clarity of the implicit declaration diagnostic (PR #149314)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 17 11:19:42 PDT 2025


================
@@ -22,7 +22,7 @@ void_typedef f2_helper(void);
 static void f2(void *buf) {
   F12_typedef* x;
   x = f2_helper();
-  memcpy((&x[1]), (buf), 1); // expected-warning{{call to undeclared library function 'memcpy' with type 'void *(void *, const void *}} \
+  memcpy((&x[1]), (buf), 1); // expected-warning{{call to undeclared library function 'memcpy', will assume it exists with standards-mandated type 'void *(void *, const void *,}} \
----------------
steakhal wrote:

The target tripple is pinned in the test. We could spell it out if we wanted.
But it's also fine if we rtrim it after `... 'memcpy'`.
No action expected here. I just left this if you find this useful.

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


More information about the cfe-commits mailing list