[PATCH] D64741: [clangd] Added highlighting for tokens that are macro arguments.

Johan Vikström via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 17 00:42:35 PDT 2019


jvikstrom added a comment.

In D64741#1587204 <https://reviews.llvm.org/D64741#1587204>, @ilya-biryukov wrote:

> How should this behave when if the same token is used multiple times inside a macro and the uses are different? Could we add this to tests?
>  E.g.
>
>   #define W(a) class a { void test() { int a = 10; } }
>   W(foo); // <-- `foo` is a variable of a class?
>


I had completely missed that there could be conflicting tokens when only highlighting macro arguments as well. Added code to just remove conflicting tokens.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64741





More information about the cfe-commits mailing list