[cfe-commits] r67721 - in /cfe/trunk: lib/Sema/SemaStmt.cpp test/CodeGen/PR3869-indirect-goto-long.c
Gabor Greif
gabor at mac.com
Wed Mar 25 23:51:31 PDT 2009
Eli checked in:
> --- cfe/trunk/lib/Sema/SemaStmt.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaStmt.cpp Wed Mar 25 19:18:06 2009
> @@ -688,8 +688,10 @@
> Sema::ActOnIndirectGotoStmt(SourceLocation GotoLoc,SourceLocation
> StarLoc,
> ExprArg DestExp) {
> // FIXME: Verify that the operand is convertible to void*.
> -
> - return Owned(new (Context) IndirectGotoStmt((Expr*)
> DestExp.release()));
> + // Convert operand to void*
> + Expr* E = (Expr*)DestExp.release();
> + ImpCastExprToType(E, Context.VoidPtrTy);
> + return Owned(new (Context) IndirectGotoStmt(E));
> }
Eli, I just wanted to remind you that there is a sugared syntax for
(Expr*)<SomethingOwned>.release()
in the form of
<SomethingOwned>.takeAs<Expr>()
Cheers,
Gabor
More information about the cfe-commits
mailing list