@@ -2802,7 +2802,8 @@ class Sema final : public SemaBase {
2802
2802
/// (e.g., Base::), perform name lookup for that identifier as a
2803
2803
/// nested-name-specifier within the given scope, and return the result of
2804
2804
/// that name lookup.
2805
- NamedDecl *FindFirstQualifierInScope(Scope *S, NestedNameSpecifier *NNS);
2805
+ bool LookupFirstQualifierInScope(Scope *S, NestedNameSpecifier *NNS,
2806
+ UnresolvedSetImpl &R);
2806
2807
2807
2808
/// Keeps information about an identifier in a nested-name-spec.
2808
2809
///
@@ -2842,9 +2843,6 @@ class Sema final : public SemaBase {
2842
2843
/// \param EnteringContext If true, enter the context specified by the
2843
2844
/// nested-name-specifier.
2844
2845
/// \param SS Optional nested name specifier preceding the identifier.
2845
- /// \param ScopeLookupResult Provides the result of name lookup within the
2846
- /// scope of the nested-name-specifier that was computed at template
2847
- /// definition time.
2848
2846
/// \param ErrorRecoveryLookup Specifies if the method is called to improve
2849
2847
/// error recovery and what kind of recovery is performed.
2850
2848
/// \param IsCorrectedToColon If not null, suggestion of replace '::' -> ':'
@@ -2853,11 +2851,6 @@ class Sema final : public SemaBase {
2853
2851
/// not '::'.
2854
2852
/// \param OnlyNamespace If true, only considers namespaces in lookup.
2855
2853
///
2856
- /// This routine differs only slightly from ActOnCXXNestedNameSpecifier, in
2857
- /// that it contains an extra parameter \p ScopeLookupResult, which provides
2858
- /// the result of name lookup within the scope of the nested-name-specifier
2859
- /// that was computed at template definition time.
2860
- ///
2861
2854
/// If ErrorRecoveryLookup is true, then this call is used to improve error
2862
2855
/// recovery. This means that it should not emit diagnostics, it should
2863
2856
/// just return true on failure. It also means it should only return a valid
@@ -2866,7 +2859,6 @@ class Sema final : public SemaBase {
2866
2859
/// specifier.
2867
2860
bool BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo,
2868
2861
bool EnteringContext, CXXScopeSpec &SS,
2869
- NamedDecl *ScopeLookupResult,
2870
2862
bool ErrorRecoveryLookup,
2871
2863
bool *IsCorrectedToColon = nullptr,
2872
2864
bool OnlyNamespace = false);
@@ -8566,11 +8558,12 @@ class Sema final : public SemaBase {
8566
8558
const TemplateArgumentListInfo *TemplateArgs,
8567
8559
bool IsDefiniteInstance, const Scope *S);
8568
8560
8569
- ExprResult ActOnDependentMemberExpr(
8570
- Expr *Base, QualType BaseType, bool IsArrow, SourceLocation OpLoc,
8571
- const CXXScopeSpec &SS, SourceLocation TemplateKWLoc,
8572
- NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo,
8573
- const TemplateArgumentListInfo *TemplateArgs);
8561
+ ExprResult
8562
+ ActOnDependentMemberExpr(Expr *Base, QualType BaseType, bool IsArrow,
8563
+ SourceLocation OpLoc, const CXXScopeSpec &SS,
8564
+ SourceLocation TemplateKWLoc,
8565
+ const DeclarationNameInfo &NameInfo,
8566
+ const TemplateArgumentListInfo *TemplateArgs);
8574
8567
8575
8568
/// The main callback when the parser finds something like
8576
8569
/// expression . [nested-name-specifier] identifier
@@ -8626,15 +8619,14 @@ class Sema final : public SemaBase {
8626
8619
ExprResult BuildMemberReferenceExpr(
8627
8620
Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow,
8628
8621
CXXScopeSpec &SS, SourceLocation TemplateKWLoc,
8629
- NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo,
8622
+ const DeclarationNameInfo &NameInfo,
8630
8623
const TemplateArgumentListInfo *TemplateArgs, const Scope *S,
8631
8624
ActOnMemberAccessExtraArgs *ExtraArgs = nullptr);
8632
8625
8633
8626
ExprResult
8634
8627
BuildMemberReferenceExpr(Expr *Base, QualType BaseType, SourceLocation OpLoc,
8635
8628
bool IsArrow, const CXXScopeSpec &SS,
8636
- SourceLocation TemplateKWLoc,
8637
- NamedDecl *FirstQualifierInScope, LookupResult &R,
8629
+ SourceLocation TemplateKWLoc, LookupResult &R,
8638
8630
const TemplateArgumentListInfo *TemplateArgs,
8639
8631
const Scope *S, bool SuppressQualifierCheck = false,
8640
8632
ActOnMemberAccessExtraArgs *ExtraArgs = nullptr);
@@ -11122,15 +11114,14 @@ class Sema final : public SemaBase {
11122
11114
QualType ObjectType, bool EnteringContext,
11123
11115
RequiredTemplateKind RequiredTemplate = SourceLocation(),
11124
11116
AssumedTemplateKind *ATK = nullptr,
11125
- bool AllowTypoCorrection = true);
11117
+ bool AllowTypoCorrection = true, bool MayBeNNS = false );
11126
11118
11127
- TemplateNameKind isTemplateName(Scope *S, CXXScopeSpec &SS,
11128
- bool hasTemplateKeyword,
11129
- const UnqualifiedId &Name,
11130
- ParsedType ObjectType, bool EnteringContext,
11131
- TemplateTy &Template,
11132
- bool &MemberOfUnknownSpecialization,
11133
- bool Disambiguation = false);
11119
+ TemplateNameKind
11120
+ isTemplateName(Scope *S, CXXScopeSpec &SS, bool hasTemplateKeyword,
11121
+ const UnqualifiedId &Name, ParsedType ObjectType,
11122
+ bool EnteringContext, TemplateTy &Template,
11123
+ bool &MemberOfUnknownSpecialization,
11124
+ bool Disambiguation = false, bool MayBeNNS = false);
11134
11125
11135
11126
/// Try to resolve an undeclared template name as a type template.
11136
11127
///
@@ -11459,12 +11450,11 @@ class Sema final : public SemaBase {
11459
11450
/// For example, given "x.MetaFun::template apply", the scope specifier
11460
11451
/// \p SS will be "MetaFun::", \p TemplateKWLoc contains the location
11461
11452
/// of the "template" keyword, and "apply" is the \p Name.
11462
- TemplateNameKind ActOnTemplateName(Scope *S, CXXScopeSpec &SS,
11463
- SourceLocation TemplateKWLoc,
11464
- const UnqualifiedId &Name,
11465
- ParsedType ObjectType,
11466
- bool EnteringContext, TemplateTy &Template,
11467
- bool AllowInjectedClassName = false);
11453
+ TemplateNameKind
11454
+ ActOnTemplateName(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc,
11455
+ const UnqualifiedId &Name, ParsedType ObjectType,
11456
+ bool EnteringContext, TemplateTy &Template,
11457
+ bool AllowInjectedClassName = false, bool MayBeNNS = false);
11468
11458
11469
11459
DeclResult ActOnClassTemplateSpecialization(
11470
11460
Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc,
0 commit comments