From d59b8323203503ddef5f85ace351ab72d5f88398 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 19 Dec 2012 01:39:02 +0000 Subject: PR13470: Ensure that copy-list-initialization isntantiates as copy-list-initialization (and doesn't add an additional copy step): Fill in the ListInitialization bit when creating a CXXConstructExpr. Use it when instantiating initializers in order to correctly handle instantiation of copy-list-initialization. Teach TreeTransform that function arguments are initializations, and so need this special treatment too. Finally, remove some hacks which were working around SubstInitializer's shortcomings. llvm-svn: 170489 --- clang/lib/Serialization/ASTWriterStmt.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Serialization/ASTWriterStmt.cpp') diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp index 7e8ce42d7ca..1591c6c86a7 100644 --- a/clang/lib/Serialization/ASTWriterStmt.cpp +++ b/clang/lib/Serialization/ASTWriterStmt.cpp @@ -1076,6 +1076,7 @@ void ASTStmtWriter::VisitCXXConstructExpr(CXXConstructExpr *E) { Writer.AddSourceLocation(E->getLocation(), Record); Record.push_back(E->isElidable()); Record.push_back(E->hadMultipleCandidates()); + Record.push_back(E->isListInitialization()); Record.push_back(E->requiresZeroInitialization()); Record.push_back(E->getConstructionKind()); // FIXME: stable encoding Writer.AddSourceRange(E->getParenRange(), Record); -- cgit v1.2.3