diff options
author | Eric Liu <ioeric@google.com> | 2018-05-11 12:12:08 +0000 |
---|---|---|
committer | Eric Liu <ioeric@google.com> | 2018-05-11 12:12:08 +0000 |
commit | 9133ecdc8e1679fbe6fd346264cef7caa6e4ce80 (patch) | |
tree | 3b3bb664bec3a42210b8ecc1f1cc376998294f7b /clang-tools-extra/clangd/SourceCode.h | |
parent | e7306b105eb7f0aeac48f380ffb7b855995dabfd (diff) | |
download | bcm5719-llvm-9133ecdc8e1679fbe6fd346264cef7caa6e4ce80.tar.gz bcm5719-llvm-9133ecdc8e1679fbe6fd346264cef7caa6e4ce80.zip |
[clangd] Move helpers that convert Replacements to TextEdits to SourceCode.h
Reviewers: ilya-biryukov
Reviewed By: ilya-biryukov
Subscribers: klimek, MaskRay, jkorous, cfe-commits
Differential Revision: https://reviews.llvm.org/D46670
llvm-svn: 332089
Diffstat (limited to 'clang-tools-extra/clangd/SourceCode.h')
-rw-r--r-- | clang-tools-extra/clangd/SourceCode.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/SourceCode.h b/clang-tools-extra/clangd/SourceCode.h index 8867b90c3c7..a61d411fe13 100644 --- a/clang-tools-extra/clangd/SourceCode.h +++ b/clang-tools-extra/clangd/SourceCode.h @@ -15,6 +15,7 @@ #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_SOURCECODE_H #include "Protocol.h" #include "clang/Basic/SourceLocation.h" +#include "clang/Tooling/Core/Replacement.h" namespace clang { class SourceManager; @@ -55,6 +56,11 @@ std::pair<size_t, size_t> offsetToClangLineColumn(llvm::StringRef Code, std::pair<llvm::StringRef, llvm::StringRef> splitQualifiedName(llvm::StringRef QName); +TextEdit replacementToEdit(StringRef Code, const tooling::Replacement &R); + +std::vector<TextEdit> replacementsToEdits(StringRef Code, + const tooling::Replacements &Repls); + } // namespace clangd } // namespace clang #endif |