We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95132fd commit 1cd5d2eCopy full SHA for 1cd5d2e
include/swift/Basic/SourceManager.h
@@ -103,6 +103,13 @@ class SourceManager {
103
rangeContainsTokenLoc(Enclosing, Inner.End);
104
}
105
106
+ /// Returns true if range \p R contains the code-completion location, if any.
107
+ bool rangeContainsCodeCompletionLoc(SourceRange R) const {
108
+ return CodeCompletionBufferID
109
+ ? rangeContainsTokenLoc(R, getCodeCompletionLoc())
110
+ : false;
111
+ }
112
+
113
/// Returns the buffer ID for the specified *valid* location.
114
///
115
/// Because a valid source location always corresponds to a source buffer,
0 commit comments