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

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 3 06:45:33 PST 2021


kbobyrev added inline comments.


================
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:355
+  // This helper checks if there is a condition variable has NewName.
+  auto CheckConditionVariable = [&](const auto *Scope) -> const NamedDecl * {
+    if (!Scope)
----------------
hokein wrote:
> nit: explicit spell out the `auto` type?
That's the idea behind this helper: it's used both on `IfStmt` and `WhileStmt`, so the point here is that `getConditionVariableDeclStmt()` is available in both but not via interface/inheritance.


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