[clang] Sema: detect adjusted function prototypes to fix crash with __typeof + __asm + noreturn (#173598) (PR #174092)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 2 19:18:54 PST 2026


================
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -std=c2x -fsyntax-only -verify %s
+// expected-no-diagnostics
+
+int memcmp(const void *, const void *, unsigned long);
+
+__typeof(memcmp) memcmp_alias __asm__("memory_compare") __attribute__((noreturn));
----------------
Sirraide wrote:

Can you also add a test that uses a function type `typedef` rather than `typeof`?

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


More information about the cfe-commits mailing list