[PATCH] D137817: [clangd] Improve action `RemoveUsingNamespace` for user-defined literals

Vincent Hong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 16 10:20:34 PST 2022


v1nh1shungry updated this revision to Diff 483582.
v1nh1shungry added a comment.

Reimplemented.

Note:

Failed to find a way to use `ReferenceLoc` to insert the using-declarations.
Currently I have to visit the `Decl` again and look for `CompoundStmt`, if there
is any target user-defined literal in the `CompoundStmt` I mark it so that
I can add the using-declaration in it later.

In this way this implementation covers many cases, and does nothing for user-defined
literals used in the top-level. But it can cause redundancy and is too complex.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137817

Files:
  clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp
  clang-tools-extra/clangd/unittests/tweaks/RemoveUsingNamespaceTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137817.483582.patch
Type: text/x-patch
Size: 7118 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221216/41c261c1/attachment.bin>


More information about the cfe-commits mailing list