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

2019-08-30 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370473: [clangd] Added highlighting for structured bindings. (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

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

2019-08-30 Thread Haojian Wu via Phabricator via cfe-commits
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]],

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

2019-08-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D66738#1652285 , @hokein wrote: > I don't have a strong preference on how to highlight `BindingDecl`, but I > think highlighting them as `Variable` is better than no highlighting them at > all, so LGTM from myside.

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

2019-08-30 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked an inline comment as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp:443 +$Primitive[[int]] $Variable[[A]][2] = {1,2}; +auto [$Variable[[B1]], $Variable[[B2]]] = $Variable[[A]];

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

2019-08-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. I don't have a strong preference on how to highlight `BindingDecl`, but I think highlighting them as `Variable` is better than no highlighting them at all, so LGTM from myside. @ilya-biryukov thoughts? again, please update the patch description in phabricator and your

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

2019-08-28 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 217652. jvikstrom marked 6 inline comments as done. jvikstrom added a comment. Abandoned trying to highlight the same as the bound decl. Reasoning: If you have a reference to a parameter we are not trying to highlight the reference as a parameter, the

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

2019-08-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:236 + // binding if one exist. + if (const auto *BB = B->getBinding()) +if (const auto *RD = BB->getReferencedDeclOfCallee()) nit: could you spell out

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

2019-08-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. Structured bindings are in a BindingDecl. The decl the declRefExpr points to are the BindingDecls. So