[PATCH] D135489: [clangd] Fix rename for symbol introduced by UsingDecl

Tom Praschan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 9 03:05:28 PDT 2022


tom-anders marked 2 inline comments as done.
tom-anders added inline comments.


================
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:170
+void filterUsingDecl(llvm::DenseSet<const NamedDecl *>& Decls) {
+  // There should never be more than one UsingDecl here, 
+  // otherwise the rename would be ambiguos anyway.
----------------
sammccall wrote:
> nit: `llvm::erase_if(Decls, [](const NamedDecl *D) { ... })`?
Does not work unfortunately, `DenseSet` does not have the `erase(iterator first, iterator last)` overload, there's only `erase(iterator pos)`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135489/new/

https://reviews.llvm.org/D135489



More information about the cfe-commits mailing list