mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[RangeInfo] Report the innermost decl context for the range under selection. (#6448)
This commit is contained in:
@@ -24,6 +24,7 @@ namespace swift {
|
||||
class Expr;
|
||||
class Stmt;
|
||||
class Decl;
|
||||
class DeclContext;
|
||||
class SourceLoc;
|
||||
class SourceRange;
|
||||
class ASTWalker;
|
||||
@@ -42,6 +43,10 @@ namespace swift {
|
||||
|
||||
void walk(ASTWalker &Walker);
|
||||
void walk(ASTWalker &&walker) { walk(walker); }
|
||||
|
||||
/// \brief get the underlying entity as a decl context if it is one,
|
||||
/// otherwise, return nullptr;
|
||||
DeclContext *getAsDeclContext() const;
|
||||
};
|
||||
|
||||
} // namespace swift
|
||||
|
||||
Reference in New Issue
Block a user