This revision was automatically updated to reflect the committed changes.
Closed by commit rG86a4a530f435: [clangd] Add a distinct highlighting for local
variables (authored by nridge).
Changed prior to commit:
https://reviews.llvm.org/D66723?vs=217065&id=217476#toc
Repository:
rG LLVM Githu
hokein accepted this revision.
hokein added inline comments.
This revision is now accepted and ready to land.
Comment at: clang-tools-extra/clangd/SemanticHighlighting.h:38
Primitive,
+ LocalVariable,
ilya-biryukov wrote:
> NIT: maybe put it right after `Va
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:229
+if (const VarDecl *VD = dyn_cast(D)) {
+ if (VD->isLocalVarDecl()) {
+addToken(Loc, HighlightingKind::LocalVariable);
nit: `addToken(Loc, VD->isLoc
ilya-biryukov added inline comments.
Comment at: clang-tools-extra/clangd/SemanticHighlighting.h:38
Primitive,
+ LocalVariable,
NIT: maybe put it right after `Variable`? IIUC, we do not rely on actual
numeric values being the same across different clangd v
nridge created this revision.
nridge added reviewers: hokein, jvikstrom.
Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay,
ilya-biryukov.
Herald added a project: clang.
It's useful to be able to distinguish local variables from namespace
scope variables.
Repository: