[clang] [PAC] Implement function pointer re-signing (PR #98847)

Daniil Kovalev via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 16 05:00:38 PDT 2024


================
@@ -2373,7 +2373,9 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
       DestLV.setTBAAInfo(TBAAAccessInfo::getMayAliasInfo());
       return EmitLoadOfLValue(DestLV, CE->getExprLoc());
     }
-    return Builder.CreateBitCast(Src, DstTy);
+
+    llvm::Value *Result = Builder.CreateBitCast(Src, DstTy);
----------------
kovdan01 wrote:

Is there a test for this code path? If it's missing, I'm OK with adding that later in a follow-up patch.

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


More information about the cfe-commits mailing list