[PATCH] D96247: [clangd] Fix false positive in local rename collision detetction
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 8 06:40:44 PST 2021
hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.
Thanks for the quick fix.
================
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:427
+ // something in the definition's body is a valid transformation.
+ if (!EnclosingFunction->isThisDeclarationADefinition())
+ return nullptr;
----------------
I think using `doesThisDeclarationHaveABody` is a better fit, e.g. `Foo(Foo& a) = default;` is a definition, but no function body :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96247/new/
https://reviews.llvm.org/D96247
More information about the cfe-commits
mailing list