[PATCH] D66738: [clangd] Added highlighting for structured bindings.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 30 04:28:46 PDT 2019


hokein accepted this revision.
hokein added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp:443
+        $Primitive[[int]] $Variable[[A]][2] = {1,2};
+        auto [$Variable[[B1]], $Variable[[B2]]] = $Variable[[A]];
+        auto [$Variable[[G1]], $Variable[[G2]]] = $Variable[[Global]];
----------------
jvikstrom wrote:
> hokein wrote:
> > this is not related to the patch,  but the highlighting behavior for auto here is weird, some of them are highlighted while some of them are not. 
> The reason for that is broken down here: https://reviews.llvm.org/D66516#inline-599982
> 
> Basically we don't traverse the type hierarchy when trying to add highlightings for auto so if we have a pointer/array type it will not find the actual type and just silently not add any highlightings.
thanks for the explanation.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66738/new/

https://reviews.llvm.org/D66738





More information about the cfe-commits mailing list