@@ -418,7 +418,7 @@ ParsedType Sema::getTypeName(const IdentifierInfo &II, SourceLocation NameLoc,
418418 NamedDecl *IIDecl = nullptr;
419419 UsingShadowDecl *FoundUsingShadow = nullptr;
420420 switch (Result.getResultKind()) {
421- case LookupResult ::NotFound:
421+ case LookupResultKind ::NotFound:
422422 if (CorrectedII) {
423423 TypeNameValidatorCCC CCC(/*AllowInvalid=*/true, isClassName,
424424 AllowDeducedTemplate);
@@ -460,7 +460,7 @@ ParsedType Sema::getTypeName(const IdentifierInfo &II, SourceLocation NameLoc,
460460 }
461461 Result.suppressDiagnostics();
462462 return nullptr;
463- case LookupResult ::NotFoundInCurrentInstantiation:
463+ case LookupResultKind ::NotFoundInCurrentInstantiation:
464464 if (AllowImplicitTypename == ImplicitTypenameContext::Yes) {
465465 QualType T = Context.getDependentNameType(ElaboratedTypeKeyword::None,
466466 SS->getScopeRep(), &II);
@@ -472,12 +472,12 @@ ParsedType Sema::getTypeName(const IdentifierInfo &II, SourceLocation NameLoc,
472472 return CreateParsedType(T, TLB.getTypeSourceInfo(Context, T));
473473 }
474474 [[fallthrough]];
475- case LookupResult ::FoundOverloaded:
476- case LookupResult ::FoundUnresolvedValue:
475+ case LookupResultKind ::FoundOverloaded:
476+ case LookupResultKind ::FoundUnresolvedValue:
477477 Result.suppressDiagnostics();
478478 return nullptr;
479479
480- case LookupResult ::Ambiguous:
480+ case LookupResultKind ::Ambiguous:
481481 // Recover from type-hiding ambiguities by hiding the type. We'll
482482 // do the lookup again when looking for an object, and we can
483483 // diagnose the error then. If we don't do this, then the error
@@ -521,7 +521,7 @@ ParsedType Sema::getTypeName(const IdentifierInfo &II, SourceLocation NameLoc,
521521 // perform the name lookup again.
522522 break;
523523
524- case LookupResult ::Found:
524+ case LookupResultKind ::Found:
525525 IIDecl = Result.getFoundDecl();
526526 FoundUsingShadow = dyn_cast<UsingShadowDecl>(*Result.begin());
527527 break;
@@ -657,7 +657,7 @@ DeclSpec::TST Sema::isTagName(IdentifierInfo &II, Scope *S) {
657657 LookupResult R(*this, &II, SourceLocation(), LookupTagName);
658658 LookupName(R, S, false);
659659 R.suppressDiagnostics();
660- if (R.getResultKind() == LookupResult ::Found)
660+ if (R.getResultKind() == LookupResultKind ::Found)
661661 if (const TagDecl *TD = R.getAsSingle<TagDecl>()) {
662662 switch (TD->getTagKind()) {
663663 case TagTypeKind::Struct:
@@ -926,7 +926,7 @@ Sema::NameClassification Sema::ClassifyName(Scope *S, CXXScopeSpec &SS,
926926
927927Corrected:
928928 switch (Result.getResultKind()) {
929- case LookupResult ::NotFound:
929+ case LookupResultKind ::NotFound:
930930 // If an unqualified-id is followed by a '(', then we have a function
931931 // call.
932932 if (SS.isEmpty() && NextToken.is(tok::l_paren)) {
@@ -1043,7 +1043,7 @@ Sema::NameClassification Sema::ClassifyName(Scope *S, CXXScopeSpec &SS,
10431043 Result.suppressDiagnostics();
10441044 return NameClassification::Unknown();
10451045
1046- case LookupResult ::NotFoundInCurrentInstantiation: {
1046+ case LookupResultKind ::NotFoundInCurrentInstantiation: {
10471047 // We performed name lookup into the current instantiation, and there were
10481048 // dependent bases, so we treat this result the same way as any other
10491049 // dependent nested-name-specifier.
@@ -1061,12 +1061,12 @@ Sema::NameClassification Sema::ClassifyName(Scope *S, CXXScopeSpec &SS,
10611061 return NameClassification::DependentNonType();
10621062 }
10631063
1064- case LookupResult ::Found:
1065- case LookupResult ::FoundOverloaded:
1066- case LookupResult ::FoundUnresolvedValue:
1064+ case LookupResultKind ::Found:
1065+ case LookupResultKind ::FoundOverloaded:
1066+ case LookupResultKind ::FoundUnresolvedValue:
10671067 break;
10681068
1069- case LookupResult ::Ambiguous:
1069+ case LookupResultKind ::Ambiguous:
10701070 if (getLangOpts().CPlusPlus && NextToken.is(tok::less) &&
10711071 hasAnyAcceptableTemplateNames(Result, /*AllowFunctionTemplates=*/true,
10721072 /*AllowDependent=*/false)) {
@@ -1498,11 +1498,11 @@ static bool AllowOverloadingOfFunction(const LookupResult &Previous,
14981498 // to check at least two; hence the 'any_of' check below. Note that
14991499 // the overloadable attribute is implicitly added to declarations
15001500 // that were required to have it but did not.
1501- if (Previous.getResultKind() == LookupResult ::FoundOverloaded) {
1501+ if (Previous.getResultKind() == LookupResultKind ::FoundOverloaded) {
15021502 return llvm::any_of(Previous, [](const NamedDecl *ND) {
15031503 return ND->hasAttr<OverloadableAttr>();
15041504 });
1505- } else if (Previous.getResultKind() == LookupResult ::Found)
1505+ } else if (Previous.getResultKind() == LookupResultKind ::Found)
15061506 return Previous.getFoundDecl()->hasAttr<OverloadableAttr>();
15071507
15081508 return false;
@@ -8290,7 +8290,7 @@ static SourceLocation getCaptureLocation(const LambdaScopeInfo *LSI,
82908290static bool shouldWarnIfShadowedDecl(const DiagnosticsEngine &Diags,
82918291 const LookupResult &R) {
82928292 // Only diagnose if we're shadowing an unambiguous field or variable.
8293- if (R.getResultKind() != LookupResult ::Found)
8293+ if (R.getResultKind() != LookupResultKind ::Found)
82948294 return false;
82958295
82968296 // Return false if warning is ignored.
@@ -10504,7 +10504,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
1050410504 // Recover gracefully from an invalid redeclaration.
1050510505 D.setRedeclaration(true);
1050610506 assert((NewFD->isInvalidDecl() || !D.isRedeclaration() ||
10507- Previous.getResultKind() != LookupResult ::FoundOverloaded) &&
10507+ Previous.getResultKind() != LookupResultKind ::FoundOverloaded) &&
1050810508 "previous declaration set still overloaded");
1050910509
1051010510 // Diagnose no-prototype function declarations with calling conventions that
@@ -10671,7 +10671,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
1067110671
1067210672 assert((NewFD->isInvalidDecl() || NewFD->isMultiVersion() ||
1067310673 !D.isRedeclaration() ||
10674- Previous.getResultKind() != LookupResult ::FoundOverloaded) &&
10674+ Previous.getResultKind() != LookupResultKind ::FoundOverloaded) &&
1067510675 "previous declaration set still overloaded");
1067610676
1067710677 NamedDecl *PrincipalDecl = (FunctionTemplate
@@ -18679,19 +18679,19 @@ FieldDecl *Sema::HandleField(Scope *S, RecordDecl *Record,
1867918679 RedeclarationKind::ForVisibleRedeclaration);
1868018680 LookupName(Previous, S);
1868118681 switch (Previous.getResultKind()) {
18682- case LookupResult ::Found:
18683- case LookupResult ::FoundUnresolvedValue:
18684- PrevDecl = Previous.getAsSingle<NamedDecl>();
18685- break;
18682+ case LookupResultKind ::Found:
18683+ case LookupResultKind ::FoundUnresolvedValue:
18684+ PrevDecl = Previous.getAsSingle<NamedDecl>();
18685+ break;
1868618686
18687- case LookupResult ::FoundOverloaded:
18688- PrevDecl = Previous.getRepresentativeDecl();
18689- break;
18687+ case LookupResultKind ::FoundOverloaded:
18688+ PrevDecl = Previous.getRepresentativeDecl();
18689+ break;
1869018690
18691- case LookupResult ::NotFound:
18692- case LookupResult ::NotFoundInCurrentInstantiation:
18693- case LookupResult ::Ambiguous:
18694- break;
18691+ case LookupResultKind ::NotFound:
18692+ case LookupResultKind ::NotFoundInCurrentInstantiation:
18693+ case LookupResultKind ::Ambiguous:
18694+ break;
1869518695 }
1869618696 Previous.suppressDiagnostics();
1869718697
0 commit comments