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

Aaron Ballman via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 25 06:54:24 PDT 2026


================
@@ -3001,6 +3001,29 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
 
   FPOptions FPO;
   switch (BuiltinID) {
+  case Builtin::BI__builtin_nan:
----------------
AaronBallman wrote:

Ah, sorry for the confusion with the earlier suggestion -- now the PR is trying to do two things at once: 1) fix the failed assertion, 2) disallow u8 string literals. I think this PR should focus on #1 and we do a separate PR or file an issue for #2 (I don't think these changes are correct for #2; I think that requires a more general solution where we catch this during type conversion checking instead of specific to this builtin)

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


More information about the llvm-commits mailing list