aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-01-31 22:47:07 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-01-31 22:47:07 +0000
commitd29975fd08713eb9d1777e60536addaa62df8995 (patch)
tree2c93c1ac58918cd2c316b8dcc6bb5bde176d1ae3 /lib/Sema/SemaStmt.cpp
parentc6c14e56e34864c5d9343d9ea62ab688cf301eee (diff)
Make sure we call MaybeCreateExprWithCleanups for the sub-expression of an indirect goto.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149441 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r--lib/Sema/SemaStmt.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 00f71c7ee5..6d5824a969 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -1611,6 +1611,7 @@ Sema::ActOnIndirectGotoStmt(SourceLocation GotoLoc, SourceLocation StarLoc,
E = ExprRes.take();
if (DiagnoseAssignmentResult(ConvTy, StarLoc, DestTy, ETy, E, AA_Passing))
return StmtError();
+ E = MaybeCreateExprWithCleanups(E);
}
getCurFunction()->setHasIndirectGoto();