[clang] [Clang] Fix assertion failure when passing wide string literal to __builtin_nanf (PR #205452)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 24 08:06:50 PDT 2026


================
@@ -0,0 +1,3 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+char hello = __builtin_nanf(L""); // expected-error {{incompatible pointer types passing 'int[1]' to parameter of type 'const char *'}}
----------------
cor3ntin wrote:

do you have a test for `__builtin_nanf(u8"")` ?
I think we can move that test to, for example `Sema/constant-builtins-2.c`

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


More information about the cfe-commits mailing list