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 | c83c2300e1946fea78ecd3c2e93d9c2dd2638a2b (patch) | |
tree | 5f7c649d837df75ff3bcfaf0b76501c610f55ce1 /include/clang/Sema/Sema.h | |
parent | 9fcc2ab2ec5e00802880e205568ff3afbd70a773 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170489 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/Sema.h')
-rw-r--r-- | include/clang/Sema/Sema.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index 047804ae4f..ab66c9dbb8 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -3367,13 +3367,6 @@ public: UnqualifiedId &Name, TypeResult Type); - /// InitializeVarWithConstructor - Creates an CXXConstructExpr - /// and sets it as the initializer for the passed in VarDecl. - bool InitializeVarWithConstructor(VarDecl *VD, - CXXConstructorDecl *Constructor, - MultiExprArg Exprs, - bool HadMultipleCandidates); - /// BuildCXXConstructExpr - Creates a complete call to a constructor, /// including handling of its default argument expressions. /// @@ -3381,8 +3374,9 @@ public: ExprResult BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType, CXXConstructorDecl *Constructor, MultiExprArg Exprs, - bool HadMultipleCandidates, bool RequiresZeroInit, - unsigned ConstructKind, SourceRange ParenRange); + bool HadMultipleCandidates, bool IsListInitialization, + bool RequiresZeroInit, unsigned ConstructKind, + SourceRange ParenRange); // FIXME: Can re remove this and have the above BuildCXXConstructExpr check if // the constructor can be elidable? @@ -3390,8 +3384,8 @@ public: BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType, CXXConstructorDecl *Constructor, bool Elidable, MultiExprArg Exprs, bool HadMultipleCandidates, - bool RequiresZeroInit, unsigned ConstructKind, - SourceRange ParenRange); + bool IsListInitialization, bool RequiresZeroInit, + unsigned ConstructKind, SourceRange ParenRange); /// BuildCXXDefaultArgExpr - Creates a CXXDefaultArgExpr, instantiating /// the default expr if needed. |