r269382 - Preserve the FoundDecl properly in constructor overload resolution. No
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Thu May 12 16:45:49 PDT 2016
Author: rsmith
Date: Thu May 12 18:45:49 2016
New Revision: 269382
URL: http://llvm.org/viewvc/llvm-project?rev=269382&view=rev
Log:
Preserve the FoundDecl properly in constructor overload resolution. No
functionality change; this information is not yet in use.
Modified:
cfe/trunk/include/clang/Sema/Initialization.h
cfe/trunk/lib/Sema/SemaInit.cpp
Modified: cfe/trunk/include/clang/Sema/Initialization.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Initialization.h?rev=269382&r1=269381&r2=269382&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/Initialization.h (original)
+++ cfe/trunk/include/clang/Sema/Initialization.h Thu May 12 18:45:49 2016
@@ -1046,8 +1046,8 @@ public:
/// \param FromInitList The constructor call is syntactically an initializer
/// list.
/// \param AsInitList The constructor is called as an init list constructor.
- void AddConstructorInitializationStep(CXXConstructorDecl *Constructor,
- AccessSpecifier Access,
+ void AddConstructorInitializationStep(DeclAccessPair FoundDecl,
+ CXXConstructorDecl *Constructor,
QualType T,
bool HadMultipleCandidates,
bool FromInitList, bool AsInitList);
Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=269382&r1=269381&r2=269382&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Thu May 12 18:45:49 2016
@@ -3224,13 +3224,9 @@ void InitializationSequence::AddListInit
Steps.push_back(S);
}
-void
-InitializationSequence
-::AddConstructorInitializationStep(CXXConstructorDecl *Constructor,
- AccessSpecifier Access,
- QualType T,
- bool HadMultipleCandidates,
- bool FromInitList, bool AsInitList) {
+void InitializationSequence::AddConstructorInitializationStep(
+ DeclAccessPair FoundDecl, CXXConstructorDecl *Constructor, QualType T,
+ bool HadMultipleCandidates, bool FromInitList, bool AsInitList) {
Step S;
S.Kind = FromInitList ? AsInitList ? SK_StdInitializerListConstructorCall
: SK_ConstructorInitializationFromList
@@ -3238,7 +3234,7 @@ InitializationSequence
S.Type = T;
S.Function.HadMultipleCandidates = HadMultipleCandidates;
S.Function.Function = Constructor;
- S.Function.FoundDecl = DeclAccessPair::make(Constructor, Access);
+ S.Function.FoundDecl = FoundDecl;
Steps.push_back(S);
}
@@ -3628,7 +3624,7 @@ static void TryConstructorInitialization
// subsumed by the initialization.
bool HadMultipleCandidates = (CandidateSet.size() > 1);
Sequence.AddConstructorInitializationStep(
- CtorDecl, Best->FoundDecl.getAccess(), DestType, HadMultipleCandidates,
+ Best->FoundDecl, CtorDecl, DestType, HadMultipleCandidates,
IsListInit | IsInitListCopy, AsInitializerList);
}
More information about the cfe-commits
mailing list