[PATCH] D69033: [clangd] Improve symbol qualification in DefineInline code action

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 16 06:36:49 PDT 2019


kadircet created this revision.
kadircet added a reviewer: ilya-biryukov.
Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay.
Herald added a project: clang.

Currently define inline action fully qualifies any names in the
function body, which is not optimal and definitely natural.

This patch tries to improve the situation by dropping any name specifiers shared
by function and names spelled in the body. For example if you are moving
definition of a function in namespace clang::clangd, and body has any decl's
coming from clang or clang::clangd namespace, those qualifications won't be
added since they are redundant.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69033

Files:
  clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
  clang-tools-extra/clangd/unittests/TweakTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69033.225207.patch
Type: text/x-patch
Size: 6706 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191016/47e146b3/attachment.bin>


More information about the cfe-commits mailing list