diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-05-11 20:37:46 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-05-11 20:37:46 +0000 |
commit | c2bebe9acab26b5af209f11b3ee978966feab491 (patch) | |
tree | 3573c6b429a7cf0bf311f648650ce49743c6a741 /clang/lib/Sema/SemaDeclCXX.cpp | |
parent | 1455de2171e8829f75935f11b254f404417c260c (diff) | |
download | bcm5719-llvm-c2bebe9acab26b5af209f11b3ee978966feab491.tar.gz bcm5719-llvm-c2bebe9acab26b5af209f11b3ee978966feab491.zip |
Preserve the FoundDecl when performing overload resolution for constructors.
This is in preparation for C++ P0136R1, which switches the model for inheriting
constructors over from synthesizing a constructor to finding base class
constructors (via using shadow decls) when looking for derived class
constructors.
llvm-svn: 269231
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 95f10f8cccf..5967c20ea6e 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -11369,6 +11369,7 @@ static bool hasOneRealArgument(MultiExprArg Args) { ExprResult Sema::BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType, + NamedDecl *FoundDecl, CXXConstructorDecl *Constructor, MultiExprArg ExprArgs, bool HadMultipleCandidates, @@ -11395,7 +11396,8 @@ Sema::BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType, Elidable = SubExpr->isTemporaryObject(Context, Constructor->getParent()); } - return BuildCXXConstructExpr(ConstructLoc, DeclInitType, Constructor, + return BuildCXXConstructExpr(ConstructLoc, DeclInitType, + FoundDecl, Constructor, Elidable, ExprArgs, HadMultipleCandidates, IsListInitialization, IsStdInitListInitialization, RequiresZeroInit, @@ -11406,7 +11408,9 @@ Sema::BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType, /// including handling of its default argument expressions. ExprResult Sema::BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType, - CXXConstructorDecl *Constructor, bool Elidable, + NamedDecl *FoundDecl, + CXXConstructorDecl *Constructor, + bool Elidable, MultiExprArg ExprArgs, bool HadMultipleCandidates, bool IsListInitialization, @@ -11416,9 +11420,9 @@ Sema::BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType, SourceRange ParenRange) { MarkFunctionReferenced(ConstructLoc, Constructor); return CXXConstructExpr::Create( - Context, DeclInitType, ConstructLoc, Constructor, Elidable, ExprArgs, - HadMultipleCandidates, IsListInitialization, IsStdInitListInitialization, - RequiresZeroInit, + Context, DeclInitType, ConstructLoc, FoundDecl, Constructor, Elidable, + ExprArgs, HadMultipleCandidates, IsListInitialization, + IsStdInitListInitialization, RequiresZeroInit, static_cast<CXXConstructExpr::ConstructionKind>(ConstructKind), ParenRange); } |