@@ -420,7 +420,7 @@ ParsedType Sema::getTypeName(const IdentifierInfo &II, SourceLocation NameLoc,
420
420
NamedDecl *IIDecl = nullptr;
421
421
UsingShadowDecl *FoundUsingShadow = nullptr;
422
422
switch (Result.getResultKind()) {
423
- case LookupResult ::NotFound:
423
+ case LookupResultKind ::NotFound:
424
424
if (CorrectedII) {
425
425
TypeNameValidatorCCC CCC(/*AllowInvalid=*/true, isClassName,
426
426
AllowDeducedTemplate);
@@ -462,7 +462,7 @@ ParsedType Sema::getTypeName(const IdentifierInfo &II, SourceLocation NameLoc,
462
462
}
463
463
Result.suppressDiagnostics();
464
464
return nullptr;
465
- case LookupResult ::NotFoundInCurrentInstantiation:
465
+ case LookupResultKind ::NotFoundInCurrentInstantiation:
466
466
if (AllowImplicitTypename == ImplicitTypenameContext::Yes) {
467
467
QualType T = Context.getDependentNameType(ElaboratedTypeKeyword::None,
468
468
SS->getScopeRep(), &II);
@@ -474,12 +474,12 @@ ParsedType Sema::getTypeName(const IdentifierInfo &II, SourceLocation NameLoc,
474
474
return CreateParsedType(T, TLB.getTypeSourceInfo(Context, T));
475
475
}
476
476
[[fallthrough]];
477
- case LookupResult ::FoundOverloaded:
478
- case LookupResult ::FoundUnresolvedValue:
477
+ case LookupResultKind ::FoundOverloaded:
478
+ case LookupResultKind ::FoundUnresolvedValue:
479
479
Result.suppressDiagnostics();
480
480
return nullptr;
481
481
482
- case LookupResult ::Ambiguous:
482
+ case LookupResultKind ::Ambiguous:
483
483
// Recover from type-hiding ambiguities by hiding the type. We'll
484
484
// do the lookup again when looking for an object, and we can
485
485
// diagnose the error then. If we don't do this, then the error
@@ -523,7 +523,7 @@ ParsedType Sema::getTypeName(const IdentifierInfo &II, SourceLocation NameLoc,
523
523
// perform the name lookup again.
524
524
break;
525
525
526
- case LookupResult ::Found:
526
+ case LookupResultKind ::Found:
527
527
IIDecl = Result.getFoundDecl();
528
528
FoundUsingShadow = dyn_cast<UsingShadowDecl>(*Result.begin());
529
529
break;
@@ -659,7 +659,7 @@ DeclSpec::TST Sema::isTagName(IdentifierInfo &II, Scope *S) {
659
659
LookupResult R(*this, &II, SourceLocation(), LookupTagName);
660
660
LookupName(R, S, false);
661
661
R.suppressDiagnostics();
662
- if (R.getResultKind() == LookupResult ::Found)
662
+ if (R.getResultKind() == LookupResultKind ::Found)
663
663
if (const TagDecl *TD = R.getAsSingle<TagDecl>()) {
664
664
switch (TD->getTagKind()) {
665
665
case TagTypeKind::Struct:
@@ -928,7 +928,7 @@ Sema::NameClassification Sema::ClassifyName(Scope *S, CXXScopeSpec &SS,
928
928
929
929
Corrected:
930
930
switch (Result.getResultKind()) {
931
- case LookupResult ::NotFound:
931
+ case LookupResultKind ::NotFound:
932
932
// If an unqualified-id is followed by a '(', then we have a function
933
933
// call.
934
934
if (SS.isEmpty() && NextToken.is(tok::l_paren)) {
@@ -1045,7 +1045,7 @@ Sema::NameClassification Sema::ClassifyName(Scope *S, CXXScopeSpec &SS,
1045
1045
Result.suppressDiagnostics();
1046
1046
return NameClassification::Unknown();
1047
1047
1048
- case LookupResult ::NotFoundInCurrentInstantiation: {
1048
+ case LookupResultKind ::NotFoundInCurrentInstantiation: {
1049
1049
// We performed name lookup into the current instantiation, and there were
1050
1050
// dependent bases, so we treat this result the same way as any other
1051
1051
// dependent nested-name-specifier.
@@ -1063,12 +1063,12 @@ Sema::NameClassification Sema::ClassifyName(Scope *S, CXXScopeSpec &SS,
1063
1063
return NameClassification::DependentNonType();
1064
1064
}
1065
1065
1066
- case LookupResult ::Found:
1067
- case LookupResult ::FoundOverloaded:
1068
- case LookupResult ::FoundUnresolvedValue:
1066
+ case LookupResultKind ::Found:
1067
+ case LookupResultKind ::FoundOverloaded:
1068
+ case LookupResultKind ::FoundUnresolvedValue:
1069
1069
break;
1070
1070
1071
- case LookupResult ::Ambiguous:
1071
+ case LookupResultKind ::Ambiguous:
1072
1072
if (getLangOpts().CPlusPlus && NextToken.is(tok::less) &&
1073
1073
hasAnyAcceptableTemplateNames(Result, /*AllowFunctionTemplates=*/true,
1074
1074
/*AllowDependent=*/false)) {
@@ -1500,11 +1500,11 @@ static bool AllowOverloadingOfFunction(const LookupResult &Previous,
1500
1500
// to check at least two; hence the 'any_of' check below. Note that
1501
1501
// the overloadable attribute is implicitly added to declarations
1502
1502
// that were required to have it but did not.
1503
- if (Previous.getResultKind() == LookupResult ::FoundOverloaded) {
1503
+ if (Previous.getResultKind() == LookupResultKind ::FoundOverloaded) {
1504
1504
return llvm::any_of(Previous, [](const NamedDecl *ND) {
1505
1505
return ND->hasAttr<OverloadableAttr>();
1506
1506
});
1507
- } else if (Previous.getResultKind() == LookupResult ::Found)
1507
+ } else if (Previous.getResultKind() == LookupResultKind ::Found)
1508
1508
return Previous.getFoundDecl()->hasAttr<OverloadableAttr>();
1509
1509
1510
1510
return false;
@@ -9092,7 +9092,7 @@ static SourceLocation getCaptureLocation(const LambdaScopeInfo *LSI,
9092
9092
static bool shouldWarnIfShadowedDecl(const DiagnosticsEngine &Diags,
9093
9093
const LookupResult &R) {
9094
9094
// Only diagnose if we're shadowing an unambiguous field or variable.
9095
- if (R.getResultKind() != LookupResult ::Found)
9095
+ if (R.getResultKind() != LookupResultKind ::Found)
9096
9096
return false;
9097
9097
9098
9098
// Return false if warning is ignored.
@@ -11475,7 +11475,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
11475
11475
// Recover gracefully from an invalid redeclaration.
11476
11476
D.setRedeclaration(true);
11477
11477
assert((NewFD->isInvalidDecl() || !D.isRedeclaration() ||
11478
- Previous.getResultKind() != LookupResult ::FoundOverloaded) &&
11478
+ Previous.getResultKind() != LookupResultKind ::FoundOverloaded) &&
11479
11479
"previous declaration set still overloaded");
11480
11480
11481
11481
// Diagnose no-prototype function declarations with calling conventions that
@@ -11642,7 +11642,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
11642
11642
11643
11643
assert((NewFD->isInvalidDecl() || NewFD->isMultiVersion() ||
11644
11644
!D.isRedeclaration() ||
11645
- Previous.getResultKind() != LookupResult ::FoundOverloaded) &&
11645
+ Previous.getResultKind() != LookupResultKind ::FoundOverloaded) &&
11646
11646
"previous declaration set still overloaded");
11647
11647
11648
11648
NamedDecl *PrincipalDecl = (FunctionTemplate
@@ -19776,19 +19776,19 @@ FieldDecl *Sema::HandleField(Scope *S, RecordDecl *Record,
19776
19776
RedeclarationKind::ForVisibleRedeclaration);
19777
19777
LookupName(Previous, S);
19778
19778
switch (Previous.getResultKind()) {
19779
- case LookupResult ::Found:
19780
- case LookupResult ::FoundUnresolvedValue:
19781
- PrevDecl = Previous.getAsSingle<NamedDecl>();
19782
- break;
19779
+ case LookupResultKind ::Found:
19780
+ case LookupResultKind ::FoundUnresolvedValue:
19781
+ PrevDecl = Previous.getAsSingle<NamedDecl>();
19782
+ break;
19783
19783
19784
- case LookupResult ::FoundOverloaded:
19785
- PrevDecl = Previous.getRepresentativeDecl();
19786
- break;
19784
+ case LookupResultKind ::FoundOverloaded:
19785
+ PrevDecl = Previous.getRepresentativeDecl();
19786
+ break;
19787
19787
19788
- case LookupResult ::NotFound:
19789
- case LookupResult ::NotFoundInCurrentInstantiation:
19790
- case LookupResult ::Ambiguous:
19791
- break;
19788
+ case LookupResultKind ::NotFound:
19789
+ case LookupResultKind ::NotFoundInCurrentInstantiation:
19790
+ case LookupResultKind ::Ambiguous:
19791
+ break;
19792
19792
}
19793
19793
Previous.suppressDiagnostics();
19794
19794
0 commit comments