[clang] [Clang] Fix a non-effective assertion (PR #81083)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 8 06:29:33 PST 2024


================
@@ -5908,7 +5908,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
           }
         }
 
-        assert(PTy->canLosslesslyBitCastTo(FTy->getParamType(i)) &&
+        assert(ArgValue->getType()->canLosslesslyBitCastTo(PTy) &&
----------------
arsenm wrote:

Is there much point to this assertion, given that the BitCast constructor will also assert castIsValid? canLosslesslyBitCastTo looks arbitrarily different from castIsValid 

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


More information about the cfe-commits mailing list