diff options
| author | Haojian Wu <hokein@google.com> | 2019-07-04 12:27:21 +0000 |
|---|---|---|
| committer | Haojian Wu <hokein@google.com> | 2019-07-04 12:27:21 +0000 |
| commit | 1ca2ee4dc11437b1b2f183190b1bf52d9f0e1151 (patch) | |
| tree | ed9bc1fe7cd9ac4c26b0ea01049f69d4bd5a7197 /clang-tools-extra/clangd/refactor | |
| parent | 5bec85a34c27c8b49ca780b8cdb9b2140a96f8cc (diff) | |
| download | bcm5719-llvm-1ca2ee4dc11437b1b2f183190b1bf52d9f0e1151.tar.gz bcm5719-llvm-1ca2ee4dc11437b1b2f183190b1bf52d9f0e1151.zip | |
[clangd] Some tweaks on semantic highlighting lookuptable.
Summary:
- move toTextMateScope to SemanticHighlighting.h;
- move the buildLookupTable to LSP layer (as LSP requires such form);
Reviewers: sammccall, jvikstrom
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D64202
llvm-svn: 365135
Diffstat (limited to 'clang-tools-extra/clangd/refactor')
| -rw-r--r-- | clang-tools-extra/clangd/refactor/tweaks/AnnotateHighlightings.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/clang-tools-extra/clangd/refactor/tweaks/AnnotateHighlightings.cpp b/clang-tools-extra/clangd/refactor/tweaks/AnnotateHighlightings.cpp index 90119b697c5..1a3f022c1d9 100644 --- a/clang-tools-extra/clangd/refactor/tweaks/AnnotateHighlightings.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/AnnotateHighlightings.cpp @@ -12,15 +12,6 @@ namespace clang { namespace clangd { namespace { -// FIXME: move it to SemanticHighlighting.h. -llvm::StringRef toTextMateScope(HighlightingKind Kind) { - static const auto &TextMateLookupTable = getTextMateScopeLookupTable(); - auto LookupIndex = static_cast<size_t>(Kind); - assert(LookupIndex < TextMateLookupTable.size() && - !TextMateLookupTable[LookupIndex].empty()); - return TextMateLookupTable[LookupIndex].front(); -} - /// Annotate all highlighting tokens in the current file. This is a hidden tweak /// which is used to debug semantic highlightings. /// Before: |

