E = ExprRes.take();
if (DiagnoseAssignmentResult(ConvTy, StarLoc, DestTy, ETy, E, AA_Passing))
return StmtError();
+ E = MaybeCreateExprWithCleanups(E);
}
getCurFunction()->setHasIndirectGoto();
ExprResult Target = getDerived().TransformExpr(S->getTarget());
if (Target.isInvalid())
return StmtError();
+ Target = SemaRef.MaybeCreateExprWithCleanups(Target.take());
if (!getDerived().AlwaysRebuild() &&
Target.get() == S->getTarget())
--- /dev/null
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+namespace test1 {
+ // Make sure this doesn't crash.
+ struct A { ~A(); };
+ void a() { goto *(A(), &&L); L: return; }
+}