Skip to content

Commit

Permalink
Merge pull request swiftlang#14345 from compnerd/const-overload
Browse files Browse the repository at this point in the history
IDE: provide const overload for `operator*`
  • Loading branch information
compnerd authored Feb 2, 2018
2 parents 2785bee + b7963d8 commit 79b0437
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/IDE/Formatting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ class FormatWalker : public SourceEntityWalker {
bool operator==(const SourceLocIterator& rhs) {return It==rhs.It;}
bool operator!=(const SourceLocIterator& rhs) {return It!=rhs.It;}
SourceLoc operator*() {return It->getLoc();}
const SourceLoc operator*() const { return It->getLoc(); }
};

void adjustTokenIteratorToImmediateAfter(SourceLoc End) {
Expand Down

0 comments on commit 79b0437

Please sign in to comment.