[PATCH] D65996: [clangd] Highlighting auto variables as the deduced type.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 9 07:11:53 PDT 2019
hokein accepted this revision.
hokein added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:143
+ const auto Deduced = AT->getDeducedType();
+ if (Deduced.isNull())
+ return true;
----------------
nit: it seems clearer to me, if we write the code like:
```
if (!Deduced.isNull()) {
addType(D->getTypeSpecStartLoc(), Deduced.getTypePtr());
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65996/new/
https://reviews.llvm.org/D65996
More information about the cfe-commits
mailing list