[PATCH] D65996: [clangd] Highlighting auto variables as the deduced type.

Johan Vikström via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 9 00:17:19 PDT 2019


jvikstrom created this revision.
jvikstrom added reviewers: hokein, ilya-biryukov.
Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay.
Herald added a project: clang.
jvikstrom updated this revision to Diff 214319.
jvikstrom added a comment.

Finished comment.


Done in VisitDeclaratorDecl as the AutoTypeLoc is not deduced.
Scoped to only work for variables.
auto function return values need to be handled in a special way (separate patch for that).
auto's that are in lambdas ar enot highlighted as we don't highlight their underlying type (it's a RecordDecl, but the name is not an identifier so it returns in addToken).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65996

Files:
  clang-tools-extra/clangd/SemanticHighlighting.cpp
  clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65996.214319.patch
Type: text/x-patch
Size: 4144 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190809/df2bf79c/attachment-0001.bin>


More information about the cfe-commits mailing list