[clang] [clang][Sema] decay functions to pointers for qualifier discarding and overflow behavior (PR #183616)

via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 4 03:58:08 PST 2026


================
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s 
----------------
NeKon69 wrote:

Ok I'm pretty sure this is a [very old clang bug](https://godbolt.org/z/3zz7jfb18)... and also the test in [`clang/test/Sema/ptrauth.c:58`](https://github.com/llvm/llvm-project/blob/main/clang/test/Sema/ptrauth.c#L58) is incorrect since it expects an array type instead of the decayed pointer. gcc in the example above does decay the array. but this thing has been around for so long that i am not even sure if i should change it.. I'll wait for some consensus on whether to touch this before I update the tests, meanwhile i'll also look for similar issues where clang isn't decaying the type when it's expected.

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


More information about the cfe-commits mailing list