[PATCH] D95925: [clangd] Detect rename conflicits within enclosing scope
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 4 00:42:40 PST 2021
hokein added inline comments.
================
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:411
+ if (const auto *EnclosingFor = Parent->get<ForStmt>())
+ return CheckCompoundStmt(EnclosingFor->getBody(), NewName);
+
----------------
another case we could add is FunctionDecl, if we rename a parameter decl, we could check collisions in the function body. this can be addressed in a follow-up.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95925/new/
https://reviews.llvm.org/D95925
More information about the cfe-commits
mailing list