summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/expression_command
diff options
context:
space:
mode:
authorJohan Vikstrom <jvikstrom@google.com>2019-08-19 16:27:49 +0000
committerJohan Vikstrom <jvikstrom@google.com>2019-08-19 16:27:49 +0000
commitf497da304161c58388d2cc1e09507cde87d51eaa (patch)
tree0c7ff491da7d9321864b27fb93468dd6e9953a70 /lldb/packages/Python/lldbsuite/test/expression_command
parent8880ac648ceb337868b7c4949776e50f5fd1cad0 (diff)
downloadbcm5719-llvm-f497da304161c58388d2cc1e09507cde87d51eaa.tar.gz
bcm5719-llvm-f497da304161c58388d2cc1e09507cde87d51eaa.zip
[clangd] Added highlighting for tokens that are macro arguments.
Summary: Adds semantic highlighting for tokens that are a macro argument. Example: ``` D_V(SomeVar); ``` The "SomeVar" inside the macro is highlighted as a variable now. Tokens that are in a macro body expansion are ignored in this patch for three reasons. * The spelling loc is inside the macro "definition" meaning it would highlight inside the macro definition (could probably easily be fixed by using getExpansionLoc instead of getSpellingLoc?) * If wanting to highlight the macro definition this could create duplicate tokens. And if the tokens are of different types there would be conflicts (tokens in the same range but with different types). Say a macro defines some name and both a variable declaration and a function use this, there would be two tokens in the macro definition but one with Kind "Variable" and the other with Kind "Function". * Thirdly, macro body expansions could come from a file that is not the main file (easily fixed, just check that the Loc is in the main file and not even a problem if we wanted to highlight the actual macro "invocation") Reviewers: hokein, sammccall, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64741 llvm-svn: 369275
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud