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

2019-11-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5075c6821982: [clangd] Improve symbol qualification in DefineInline code action (authored by kadircet). Changed prior to commit: https://reviews.llvm.org/D69033?vs=230424&id=230851#toc Repository: rG

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

2019-11-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 230424. kadircet marked 4 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69033/new/ https://reviews.llvm.org/D69033 Files: clang-tools-ex

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

2019-11-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:1730 +TEST_F(DefineInlineTest, DropCommonNamespecifiers) { + struct { NIT: capitalize the last word: `DropCommonNameSpecifiers` Repository: rG LLVM Github Mo

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

2019-11-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/unittests/TweakTests.cpp:1865 +)cpp"; + // FIXME: The last reference to cux() in body of foo should not be qualifi

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

2019-11-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp:200 +std::string Qualifier; +// FIXME: Also take using directives and namespace aliases inside function +// body into account. kadircet wrote: >

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

2019-11-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp:196 //~ -> we need to qualify Bar not x. -if (!ND->getDeclContext()->isNamespace()) +if (!ND->getLexicalDeclContext()->isNamespace()) retu

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

2019-11-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 230213. kadircet marked 4 inline comments as done. kadircet added a comment. - Address comments - Rebase - Get rid of string literals inside macros Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69033/new/ http

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

2019-11-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp:196 //~ -> we need to qualify Bar not x. -if (!ND->getDeclContext()->isNamespace()) +if (!ND->getLexicalDeclContext()->isNamespace())

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

2019-10-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 227040. kadircet added a comment. - Rebase - Move qualification logic into AST.h so that it can be used by define outline, see D69033 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

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

2019-10-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 5 inline comments as done. kadircet added a comment. In D69033#1710955 , @ilya-biryukov wrote: > We seem to have trouble only in presence of using declarations and using > namespace directives. > I wonder how complicated it would be to t

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

2019-10-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 225416. kadircet marked an inline comment as done. kadircet added a comment. - Handle using directives Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69033/new/ https://reviews.llvm.org/D69033 Files: clang-t

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

2019-10-16 Thread Christian Kühnel via Phabricator via cfe-commits
kuhnel added a comment. Build failed during patching: 00:03:00.433 [Phabricator] $ arc patch --diff 225207 --nocommit --nobranch --conduit-uri=https://reviews.llvm.org 00:03:01.736 INFO Base commit is not in local repository; trying to fetch. 00:03:02.694 00:03:02.694 00:0

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

2019-10-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. We seem to have trouble only in presence of using declarations and using namespace directives. I wonder how complicated it would be to take them into account instead. That would clearly be easier to read, as we'll hit right into the center of the problem. Could y

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

2019-10-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
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