File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -982,6 +982,16 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
982
982
// / Returns the source range of the declaration including its attributes.
983
983
SourceRange getSourceRangeIncludingAttrs () const ;
984
984
985
+ using ImportAccessLevel = llvm::Optional<AttributedImport<ImportedModule>>;
986
+
987
+ // / Returns the import that may restrict the access to this decl
988
+ // / from \p useDC.
989
+ // /
990
+ // / If this decl and \p useDC are from the same module it returns
991
+ // / \c llvm::None. If there are many imports, it returns the most
992
+ // / permissive one.
993
+ ImportAccessLevel getImportAccessFrom (const DeclContext *useDC) const ;
994
+
985
995
SourceLoc TrailingSemiLoc;
986
996
987
997
// / Whether this declaration is within a macro expansion relative to
@@ -2793,15 +2803,6 @@ class ValueDecl : public Decl {
2793
2803
bool forConformance = false ,
2794
2804
bool allowUsableFromInline = false ) const ;
2795
2805
2796
- using ImportAccessLevel = llvm::Optional<AttributedImport<ImportedModule>>;
2797
-
2798
- // / Returns the import that may restrict the access to this decl
2799
- // / from \p useDC.
2800
- // /
2801
- // / If this decl and \p useDC are from the same module it returns
2802
- // / \c llvm::None. If there are many imports, it returns the most
2803
- // / permissive one.
2804
- ImportAccessLevel getImportAccessFrom (const DeclContext *useDC) const ;
2805
2806
2806
2807
// / Returns whether this declaration should be treated as \c open from
2807
2808
// / \p useDC. This is very similar to #getFormalAccess, but takes
Original file line number Diff line number Diff line change @@ -4345,7 +4345,7 @@ bool ValueDecl::isAccessibleFrom(const DeclContext *useDC,
4345
4345
[&]() { return getFormalAccess (); });
4346
4346
}
4347
4347
4348
- ImportAccessLevel ValueDecl ::getImportAccessFrom (const DeclContext *useDC) const {
4348
+ ImportAccessLevel Decl ::getImportAccessFrom (const DeclContext *useDC) const {
4349
4349
ModuleDecl *Mod = getModuleContext ();
4350
4350
if (useDC && useDC->getParentModule () != Mod) {
4351
4351
if (auto useSF = useDC->getParentSourceFile ()) {
You can’t perform that action at this time.
0 commit comments