[PATCH] D95925: [clangd] Detect rename conflicits within enclosing scope

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 4 00:30:23 PST 2021


kbobyrev added inline comments.


================
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:334
+  DynTypedNodeList Parents(DynTypedNode::create(RenamedDecl));
+  auto GetSingleParent = [&](DynTypedNode Node) -> const DynTypedNode * {
+    Parents = Ctx.getParents(Node);
----------------
hokein wrote:
> `const DynTypedNode &`
Sorry, I'm a bit confused: this can return nullptr when there are _no parents_. Is there any way I can return the reference safely?


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