AddInitializerToDecl needs to take a full expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72640 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 641fcb7..18382ba 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -744,7 +744,7 @@
DeclPtrTy Dcl = ActOnDeclarator(S, D, DeclPtrTy());
if (!Dcl)
return ExprError();
- AddInitializerToDecl(Dcl, move(AssignExprVal));
+ AddInitializerToDecl(Dcl, move(AssignExprVal), /*DirectInit=*/false);
// Mark this variable as one that is declared within a conditional.
// We know that the decl had to be a VarDecl because that is the only type of