Skip to content

Commit 6c603c4

Browse files
committed
Add an additional hook to the DebuggerClient during name lookups.
1 parent 3f849d4 commit 6c603c4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

include/swift/AST/DebuggerClient.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ class DebuggerClient {
6161
SourceLoc Loc, bool IsTypeLookup,
6262
ResultVector &RV) = 0;
6363

64+
/// Allows the DebuggerClient to prune the results of a name lookup before
65+
/// returning to the caller. (See finishLookup in NameLookup.cpp.)
66+
virtual void finishLookup(const DeclContext *dc, NLOptions options,
67+
SmallVectorImpl<ValueDecl *> &decls) {}
68+
6469
/// When evaluating an expression in the context of an existing source file,
6570
/// we may want to prefer declarations from that source file.
6671
/// The DebuggerClient can return a private-discriminator to tell lookup to

lib/AST/NameLookup.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "swift/AST/ASTVisitor.h"
2121
#include "swift/AST/ClangModuleLoader.h"
2222
#include "swift/AST/DebuggerClient.h"
23+
#include "swift/AST/DeclContext.h"
2324
#include "swift/AST/ExistentialLayout.h"
2425
#include "swift/AST/LazyResolver.h"
2526
#include "swift/AST/Initializer.h"

0 commit comments

Comments
 (0)