Skip to content

Commit 9ea0514

Browse files
author
Denis Vnukov
committed
Reverted: Allowing SourceEntityWalker to skip visiting subscript end location
Swift SVN r31456
1 parent babdb9e commit 9ea0514

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

Diff for: include/swift/IDE/SourceEntityWalker.h

-3
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ class SourceEntityWalker {
107107

108108
virtual bool shouldWalkIntoFunctionGenericParams() { return true; }
109109

110-
/// Returns true if the walker should visit subscript end location
111-
virtual bool shouldWalkIntoSubscriptEndLoc() { return true; }
112-
113110
protected:
114111
SourceEntityWalker() = default;
115112
SourceEntityWalker(const SourceEntityWalker &) = default;

Diff for: lib/IDE/SourceEntityWalker.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ std::pair<bool, Expr *> SemaAnnotator::walkToExprPre(Expr *E) {
226226
if (!SE->getIndex()->walk(*this))
227227
return { false, nullptr };
228228

229-
if ((SubscrD != nullptr) && SEWalker.shouldWalkIntoSubscriptEndLoc()) {
229+
if (SubscrD) {
230230
if (!passReference(SubscrD, E->getEndLoc()))
231231
return { false, nullptr };
232232
}

0 commit comments

Comments
 (0)