@@ -2802,7 +2802,8 @@ class Sema final : public SemaBase {
28022802 /// (e.g., Base::), perform name lookup for that identifier as a
28032803 /// nested-name-specifier within the given scope, and return the result of
28042804 /// that name lookup.
2805- NamedDecl *FindFirstQualifierInScope(Scope *S, NestedNameSpecifier *NNS);
2805+ bool LookupFirstQualifierInScope(Scope *S, NestedNameSpecifier *NNS,
2806+ UnresolvedSetImpl &R);
28062807
28072808 /// Keeps information about an identifier in a nested-name-spec.
28082809 ///
@@ -2842,9 +2843,6 @@ class Sema final : public SemaBase {
28422843 /// \param EnteringContext If true, enter the context specified by the
28432844 /// nested-name-specifier.
28442845 /// \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.
28482846 /// \param ErrorRecoveryLookup Specifies if the method is called to improve
28492847 /// error recovery and what kind of recovery is performed.
28502848 /// \param IsCorrectedToColon If not null, suggestion of replace '::' -> ':'
@@ -2853,11 +2851,6 @@ class Sema final : public SemaBase {
28532851 /// not '::'.
28542852 /// \param OnlyNamespace If true, only considers namespaces in lookup.
28552853 ///
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- ///
28612854 /// If ErrorRecoveryLookup is true, then this call is used to improve error
28622855 /// recovery. This means that it should not emit diagnostics, it should
28632856 /// just return true on failure. It also means it should only return a valid
@@ -2866,7 +2859,6 @@ class Sema final : public SemaBase {
28662859 /// specifier.
28672860 bool BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo,
28682861 bool EnteringContext, CXXScopeSpec &SS,
2869- NamedDecl *ScopeLookupResult,
28702862 bool ErrorRecoveryLookup,
28712863 bool *IsCorrectedToColon = nullptr,
28722864 bool OnlyNamespace = false);
@@ -8566,11 +8558,12 @@ class Sema final : public SemaBase {
85668558 const TemplateArgumentListInfo *TemplateArgs,
85678559 bool IsDefiniteInstance, const Scope *S);
85688560
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);
85748567
85758568 /// The main callback when the parser finds something like
85768569 /// expression . [nested-name-specifier] identifier
@@ -8626,15 +8619,14 @@ class Sema final : public SemaBase {
86268619 ExprResult BuildMemberReferenceExpr(
86278620 Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow,
86288621 CXXScopeSpec &SS, SourceLocation TemplateKWLoc,
8629- NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo,
8622+ const DeclarationNameInfo &NameInfo,
86308623 const TemplateArgumentListInfo *TemplateArgs, const Scope *S,
86318624 ActOnMemberAccessExtraArgs *ExtraArgs = nullptr);
86328625
86338626 ExprResult
86348627 BuildMemberReferenceExpr(Expr *Base, QualType BaseType, SourceLocation OpLoc,
86358628 bool IsArrow, const CXXScopeSpec &SS,
8636- SourceLocation TemplateKWLoc,
8637- NamedDecl *FirstQualifierInScope, LookupResult &R,
8629+ SourceLocation TemplateKWLoc, LookupResult &R,
86388630 const TemplateArgumentListInfo *TemplateArgs,
86398631 const Scope *S, bool SuppressQualifierCheck = false,
86408632 ActOnMemberAccessExtraArgs *ExtraArgs = nullptr);
@@ -11122,15 +11114,14 @@ class Sema final : public SemaBase {
1112211114 QualType ObjectType, bool EnteringContext,
1112311115 RequiredTemplateKind RequiredTemplate = SourceLocation(),
1112411116 AssumedTemplateKind *ATK = nullptr,
11125- bool AllowTypoCorrection = true);
11117+ bool AllowTypoCorrection = true, bool MayBeNNS = false );
1112611118
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);
1113411125
1113511126 /// Try to resolve an undeclared template name as a type template.
1113611127 ///
@@ -11459,12 +11450,11 @@ class Sema final : public SemaBase {
1145911450 /// For example, given "x.MetaFun::template apply", the scope specifier
1146011451 /// \p SS will be "MetaFun::", \p TemplateKWLoc contains the location
1146111452 /// 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);
1146811458
1146911459 DeclResult ActOnClassTemplateSpecialization(
1147011460 Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc,
0 commit comments