[all-commits] [llvm/llvm-project] 87e0cb: [clangd] Implement semantic highlightings via find...

Ilya Biryukov via All-commits all-commits at lists.llvm.org
Tue Nov 5 10:15:47 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 87e0cb4f1ad299c87c3e26676a9b31b3caf58921
      https://github.com/llvm/llvm-project/commit/87e0cb4f1ad299c87c3e26676a9b31b3caf58921
  Author: Ilya Biryukov <ibiryukov at google.com>
  Date:   2019-11-05 (Tue, 05 Nov 2019)

  Changed paths:
    M clang-tools-extra/clangd/FindTarget.cpp
    M clang-tools-extra/clangd/FindTarget.h
    M clang-tools-extra/clangd/SemanticHighlighting.cpp
    M clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp

  Log Message:
  -----------
  [clangd] Implement semantic highlightings via findExplicitReferences

Summary:
To keep the logic of finding locations of interesting AST nodes in one
place.

The advantage is better coverage of various AST nodes, both now and in
the future: as new nodes get added to `findExplicitReferences`, semantic
highlighting will automatically pick them up.

The drawback of this change is that we have to traverse declarations
inside our file twice in order to highlight dependent names, 'auto'
and 'decltype'. Hopefully, this should not affect the actual latency
too much, most time should be spent in building the AST and not
traversing it.

Reviewers: hokein

Reviewed By: hokein

Subscribers: nridge, merge_guards_bot, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D69673




More information about the All-commits mailing list