aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--lib/Sema/SemaDeclCXX.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index c80ef2d2bdc1..7ed9bfcb9796 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -9494,6 +9494,7 @@ static void getDefaultArgExprsForConstructors(Sema &S, CXXRecordDecl *Class) {
Expr *DefaultArg = S.BuildCXXDefaultArgExpr(Class->getLocation(), CD,
CD->getParamDecl(I)).get();
+ S.DiscardCleanupsInEvaluationContext();
S.Context.addDefaultArgExprForConstructor(CD, I, DefaultArg);
}
}