File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
tools/SourceKit/lib/SwiftLang Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -945,13 +945,13 @@ class SemanticAnnotator : public SourceEntityWalker {
945
945
if (AvailableAttr::isUnavailable (D))
946
946
return true ;
947
947
948
- Optional< unsigned > inBufferID;
949
- if (SM.getRangeForBuffer (BufferID).contains (Range.getStart ()))
950
- inBufferID = BufferID ;
948
+ // FIXME: Ignore things that don't come from this buffer.
949
+ if (! SM.getRangeForBuffer (BufferID).contains (Range.getStart ()))
950
+ return true ;
951
951
952
952
auto &SM = D->getASTContext ().SourceMgr ;
953
953
if (D == D->getASTContext ().getOptionalNoneDecl () &&
954
- SM.extractText (Range, inBufferID ) == " nil" ) {
954
+ SM.extractText (Range, BufferID ) == " nil" ) {
955
955
// If a 'nil' literal occurs in a swift-case statement, it gets replaced
956
956
// by a reference to 'Optional.none' in the AST. We want to continue
957
957
// highlighting 'nil' as a keyword and not as an enum element.
You can’t perform that action at this time.
0 commit comments