[clang] [HLSL] Fix casting asserts (PR #82827)

Justin Bogner via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 23 13:00:59 PST 2024


================
@@ -4843,7 +4843,7 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType,
                  .get();
       break;
     case ICK_Floating_Integral:
-      if (ToType->isRealFloatingType())
+      if (ToType->isRealFloatingType() || ToType->hasFloatingRepresentation())
----------------
bogner wrote:

I think `isRealFloatingType` is redundant now. `hasFloatingRepresentation` will return true in all cases that it does. I guess this also means that complex types will go into this case now and they didn't before - does that matter?

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


More information about the cfe-commits mailing list