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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/SourceCode.h b/clang-tools-extra/clangd/SourceCode.h
index 4e207069569..5f27ee2be21 100644
--- a/clang-tools-extra/clangd/SourceCode.h
+++ b/clang-tools-extra/clangd/SourceCode.h
@@ -75,6 +75,13 @@ llvm::Optional<Range> getTokenRange(const SourceManager &SM,
llvm::Expected<SourceLocation> sourceLocationInMainFile(const SourceManager &SM,
Position P);
+/// Get the beginning SourceLocation at a specified \p Pos in the main file.
+/// May be invalid if Pos is, or if there's no identifier.
+/// FIXME: this returns the macro-expansion location, but it shouldn't.
+SourceLocation getBeginningOfIdentifier(const Position &Pos,
+ const SourceManager &SM,
+ const LangOptions &LangOpts);
+
/// Returns true iff \p Loc is inside the main file. This function handles
/// file & macro locations. For macro locations, returns iff the macro is being
/// expanded inside the main file.
OpenPOWER on IntegriCloud