diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-12-19 01:39:02 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-12-19 01:39:02 +0000 |
commit | d59b8323203503ddef5f85ace351ab72d5f88398 (patch) | |
tree | 3557c33b10ba6c6030a8288f083b053ccaae1b10 /clang/lib/Serialization/ASTWriterStmt.cpp | |
parent | 3a081a033926da9cdd68ccb8705ad882704f68b5 (diff) | |
download | bcm5719-llvm-d59b8323203503ddef5f85ace351ab72d5f88398.tar.gz bcm5719-llvm-d59b8323203503ddef5f85ace351ab72d5f88398.zip |
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
Diffstat (limited to 'clang/lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriterStmt.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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); |