[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-02-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. You'd need to rebase this patch, D57739 had some changes to the Tweak API. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56610/new/ https://reviews.llvm.org/D56610 ___

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-02-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 185690. sammccall added a comment. Herald added a project: clang. Update matching to use Inputs.ASTSelection. Cover some more cases of names (I think?) Handle under-qualified names as well as unqualified ones. The main benefit of this is it's a step closer

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-02-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall commandeered this revision. sammccall edited reviewers, added: ilya-biryukov; removed: sammccall. sammccall added a comment. (Grabbing this as discussed offline) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56610/new/ https://reviews.llvm.org/D56610 ___

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-29 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 184040. ilya-biryukov added a comment. - Update license header CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56610/new/ https://reviews.llvm.org/D56610 Files: clang-tools-extra/clangd/refactor/tweaks/CMakeLists.txt clang-tools-extra/clang

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 182871. ilya-biryukov added a comment. - Rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56610/new/ https://reviews.llvm.org/D56610 Files: clang-tools-extra/clangd/refactor/tweaks/CMakeLists.txt clang-tools-extra/clangd/refactor/twea

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-18 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In D56610#1363461 , @ilya-biryukov wrote: > In D56610#1363408 , @JonasToth wrote: > > > Is this for something like `add const`? > > If yes, there is clang-tidy effort on that, see > >

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D56610#1363408 , @JonasToth wrote: > Is this for something like `add const`? > If yes, there is clang-tidy effort on that, see > https://reviews.llvm.org/D54943 and https://reviews.llvm.org/D54395 for a > similar effor

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-18 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Is this for something like `add const`? If yes, there is clang-tidy effort on that, see https://reviews.llvm.org/D54943 and https://reviews.llvm.org/D54395 for a similar effort. Would be best to share the code instead of reinventing it :) CHANGES SINCE LAST ACTION

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 182545. ilya-biryukov added a comment. - Move to the monorepo - Move out the source code helpers (they're now in swap-if-branches) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56610/new/ https://reviews.llvm.org/D56610 Files: clang-tools-e

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-17 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 182320. ilya-biryukov added a comment. - Remove the header file Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56610/new/ https://reviews.llvm.org/D56610 Files: clangd/SourceCode.cpp clangd/SourceCode.

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-17 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 182316. ilya-biryukov added a comment. - Update to reflect changes in parent revision Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56610/new/ https://reviews.llvm.org/D56610 Files: clangd/SourceCode.cp

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-17 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 182273. ilya-biryukov added a comment. - Rebase after parent change Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56610/new/ https://reviews.llvm.org/D56610 Files: clangd/SourceCode.cpp clangd/SourceC

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/SourceCode.h:64 +/// Turns a token range into a half-open range and checks its correctness. +/// The resulting range will have only valid source location on both sides, both jkorous wrote: > It seems to m

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 182079. ilya-biryukov added a comment. - Update after changes to parent revision Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56610/new/ https://reviews.llvm.org/D56610 Files: clangd/CMakeLists.txt c

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-14 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. Hi Ilya, I got here from reading your other patch (https://reviews.llvm.org/D56611). I'm wondering if we could make those range utility functions more understandable. Comment at: clangd/SourceCode.h:64 +/// Turns a token range into a half-open range

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This is a somewhat simple action to illustrate the use of code action APIs. Still missing tests and trying to figure out what information we want to expose in order to avoid walking over ASTs in each of the actions, so this is not final. Should be a good reference

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 181312. ilya-biryukov added a comment. - Add some forgotten helpers Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56610/new/ https://reviews.llvm.org/D56610 Files: clangd/CMakeLists.txt clangd/CodeAct

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 181311. ilya-biryukov added a comment. - Add the code to actually instantiate a code action Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56610/new/ https://reviews.llvm.org/D56610 Files: clangd/CMakeLi

[PATCH] D56610: [clangd] A code action to qualify an unqualified name

2019-01-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, mgorny. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D56610 Files: clangd/CMakeLists.txt clangd/refactor/actions/QualifyNam