[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:29:45 PDT 2019
jvikstrom marked an inline comment as done.
jvikstrom added inline comments.
================
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:170
+ return;
+ Loc = SM.getSpellingLoc(Loc);
+ }
----------------
hokein wrote:
> The Loc here maybe not in the main file, considering the case
>
> ```
> // in .h
> #define DEFINE(X) in X;
> #define DEFINE_Y DEFINE(Y)
>
> // in .cc
>
> DEFINE_Y
> ```
The spelling loc is still going to be in `DEFINE_Y` I think. And we only highlight arguments in macros. (Added a testcase though)
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