[PATCH] D88297: [clangd] Trivial setter support when moving items to fields
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 29 12:29:00 PDT 2020
kadircet accepted this revision.
kadircet added inline comments.
================
Comment at: clang-tools-extra/clangd/Hover.cpp:466
+ auto *ND = llvm::dyn_cast<NamedDecl>(CE->getCalleeDecl());
+ if (!ND)
+ return llvm::None;
----------------
njames93 wrote:
> kadircet wrote:
> > nit: combine with the next condition, and perform the string comparison last, i.e.:
> >
> > `if(!ND || !ND->isInStd || ND->getName() != "move")`
> Can you explain the reasoning for moving the comparison to the end?
it was to skip a potentialyl expensive string comparison, but now that I look into `isInStdNamespace` it is also performing a string comparison in the end. so nvm.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88297/new/
https://reviews.llvm.org/D88297
More information about the cfe-commits
mailing list