@@ -270,16 +270,16 @@ class UnqualifiedLookupFactory {
270
270
template <typename NominalTypeDeclOrExtensionDecl>
271
271
Optional<PerScopeLookupState>
272
272
lookupInNominalTypeOrExtension (NominalTypeDeclOrExtensionDecl *D,
273
- Optional<bool > isCascadingUse);
273
+ Optional<bool > isCascadingUse) const ;
274
274
275
275
Optional<PerScopeLookupState>
276
276
lookupInDefaultArgumentInitializer (DefaultArgumentInitializer *I,
277
- Optional<bool > isCascadingUse);
277
+ Optional<bool > isCascadingUse) const ;
278
278
279
279
bool isOutsideBodyOfFunction (const AbstractFunctionDecl *const AFD) const ;
280
280
281
281
Optional<PerScopeLookupState>
282
- lookupInMiscContext (DeclContext *dc, Optional<bool > isCascadingUse);
282
+ lookupInMiscContext (DeclContext *dc, Optional<bool > isCascadingUse) const ;
283
283
284
284
// / Check the generic parameters of our context.
285
285
// / Return true if done with lookup
@@ -844,7 +844,7 @@ UnqualifiedLookupFactory::lookupInClosure(AbstractClosureExpr *ACE,
844
844
template <typename NominalTypeDeclOrExtensionDecl>
845
845
Optional<UnqualifiedLookupFactory::PerScopeLookupState>
846
846
UnqualifiedLookupFactory::lookupInNominalTypeOrExtension (
847
- NominalTypeDeclOrExtensionDecl *D, Optional<bool > isCascadingUse) {
847
+ NominalTypeDeclOrExtensionDecl *D, Optional<bool > isCascadingUse) const {
848
848
// clang-format off
849
849
return PerScopeLookupState{
850
850
false ,
@@ -860,7 +860,7 @@ UnqualifiedLookupFactory::lookupInNominalTypeOrExtension(
860
860
861
861
Optional<UnqualifiedLookupFactory::PerScopeLookupState>
862
862
UnqualifiedLookupFactory::lookupInDefaultArgumentInitializer (
863
- DefaultArgumentInitializer *I, Optional<bool > isCascadingUse) {
863
+ DefaultArgumentInitializer *I, Optional<bool > isCascadingUse) const {
864
864
// In a default argument, skip immediately out of both the
865
865
// initializer and the function.
866
866
// clang-format off
@@ -879,8 +879,8 @@ bool UnqualifiedLookupFactory::isOutsideBodyOfFunction(
879
879
}
880
880
881
881
Optional<UnqualifiedLookupFactory::PerScopeLookupState>
882
- UnqualifiedLookupFactory::lookupInMiscContext (DeclContext *dc,
883
- Optional<bool > isCascadingUse) {
882
+ UnqualifiedLookupFactory::lookupInMiscContext (
883
+ DeclContext *dc, Optional<bool > isCascadingUse) const {
884
884
// clang-format off
885
885
assert (isa<TopLevelCodeDecl>(dc) ||
886
886
isa<Initializer>(dc) ||
@@ -1618,7 +1618,7 @@ LegacyUnqualifiedLookup::LegacyUnqualifiedLookup(DeclName Name, DeclContext *DC,
1618
1618
(void )shouldReturnBasedOnResults (/* noMoreOuterResults=*/ true );
1619
1619
}
1620
1620
1621
- TypeDecl *LegacyUnqualifiedLookup::getSingleTypeResult () {
1621
+ TypeDecl *LegacyUnqualifiedLookup::getSingleTypeResult () const {
1622
1622
if (Results.size () != 1 )
1623
1623
return nullptr ;
1624
1624
return dyn_cast<TypeDecl>(Results.back ().getValueDecl ());
@@ -1662,7 +1662,7 @@ UnqualifiedLookup::UnqualifiedLookup(DeclName Name,
1662
1662
" bad refactoring" );
1663
1663
}
1664
1664
1665
- TypeDecl *UnqualifiedLookup::getSingleTypeResult () {
1665
+ TypeDecl *UnqualifiedLookup::getSingleTypeResult () const {
1666
1666
if (Results.size () != 1 )
1667
1667
return nullptr ;
1668
1668
return dyn_cast<TypeDecl>(Results.back ().getValueDecl ());
0 commit comments