summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/SourceCode.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/SourceCode.h')
-rw-r--r--clang-tools-extra/clangd/SourceCode.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/SourceCode.h b/clang-tools-extra/clangd/SourceCode.h
index 85db9458589..3ff67bc13cd 100644
--- a/clang-tools-extra/clangd/SourceCode.h
+++ b/clang-tools-extra/clangd/SourceCode.h
@@ -65,6 +65,11 @@ Position offsetToPosition(llvm::StringRef Code, size_t Offset);
/// FIXME: This should return an error if the location is invalid.
Position sourceLocToPosition(const SourceManager &SM, SourceLocation Loc);
+/// Returns the taken range at \p TokLoc.
+llvm::Optional<Range> getTokenRange(const SourceManager &SM,
+ const LangOptions &LangOpts,
+ SourceLocation TokLoc);
+
/// Return the file location, corresponding to \p P. Note that one should take
/// care to avoid comparing the result with expansion locations.
llvm::Expected<SourceLocation> sourceLocationInMainFile(const SourceManager &SM,
OpenPOWER on IntegriCloud