PR13064: Store whether an in-class initializer uses direct or copy
initialization, and use that information to produce the right kind of
initialization during template instantiation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158288 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclPrinter.cpp b/lib/AST/DeclPrinter.cpp
index 6d4eaa3..10f3894 100644
--- a/lib/AST/DeclPrinter.cpp
+++ b/lib/AST/DeclPrinter.cpp
@@ -582,7 +582,10 @@
Expr *Init = D->getInClassInitializer();
if (!Policy.SuppressInitializers && Init) {
- Out << " = ";
+ if (D->getInClassInitStyle() == ICIS_ListInit)
+ Out << " ";
+ else
+ Out << " = ";
Init->printPretty(Out, Context, 0, Policy, Indentation);
}
prettyPrintAttributes(D);