r284222 - Try to fix windows bot file path style failure caused by r284219.

2016-10-14 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri Oct 14 05:10:26 2016 New Revision: 284222 URL: http://llvm.org/viewvc/llvm-project?rev=284222&view=rev Log: Try to fix windows bot file path style failure caused by r284219. Modified: cfe/trunk/unittests/Tooling/RefactoringTest.cpp Modified: cfe/trunk/unittests/Tooli

r284228 - Removed duplicate header include

2016-10-14 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri Oct 14 06:48:10 2016 New Revision: 284228 URL: http://llvm.org/viewvc/llvm-project?rev=284228&view=rev Log: Removed duplicate header include Reviewers: ioeric Subscribers: klimek Patch by Krasimir Georgiev! Differential Revision: https://reviews.llvm.org/D25599 Modifi

[PATCH] D25610: [clang-move] Add header guard for the new header.

2016-10-14 Thread Eric Liu via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Lg Comment at: clang-move/ClangMove.cpp:264 +HeaderGuard += "#define " + GuardName + "\n"; +clang::tooling::Replacement HeaderGuardInclude(FileName, 0, 0, +

[PATCH] D25613: [clang-move] Don't overuse Replacements::add.

2016-10-14 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: clang-move/ClangMove.cpp:472 std::string FilePath = RemoveReplacement.getFilePath().str(); addOrMergeReplacement(RemoveReplacement, &FileToReplacements[FilePath]); For deletions, you can simply use `add`, whic

[PATCH] D25613: [clang-move] Don't overuse Replacements::add.

2016-10-14 Thread Eric Liu via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Awesome! Lg with one nit. Comment at: clang-move/ClangMove.cpp:197 clang::tooling::Replacement getReplacementInChangedCode(const clang::tooling::Replacements &Replacements,

r320030 - [Index] Add setPreprocessor member to IndexDataConsumer.

2017-12-07 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Dec 7 03:04:24 2017 New Revision: 320030 URL: http://llvm.org/viewvc/llvm-project?rev=320030&view=rev Log: [Index] Add setPreprocessor member to IndexDataConsumer. Summary: This enables us to use information in Preprocessor when handling symbol occurrences. Reviewers: a

[clang-tools-extra] r320139 - [change-namespace] Fix crash when injected base-class name is used in friend declarations.

2017-12-08 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri Dec 8 02:06:16 2017 New Revision: 320139 URL: http://llvm.org/viewvc/llvm-project?rev=320139&view=rev Log: [change-namespace] Fix crash when injected base-class name is used in friend declarations. Reviewers: hokein Subscribers: klimek, cfe-commits Differential Revisi

Phabricator will be down for ~30 mins

2017-12-12 Thread Eric Liu via cfe-commits
Upgrading Phabricator to a newer version. Sorry for the short notice! - Eric ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: Phabricator will be down for ~30 mins

2017-12-12 Thread Eric Liu via cfe-commits
It was faster than I thought. Phabricator is up again. The most noticeable new feature is the ability to hide inline comments:[image: xkhNjkAc2ma.png] Cheers, Eric On Tue, Dec 12, 2017 at 11:32 AM Eric Liu wrote: > Upgrading Phabricator to a newer version. Sorry for the short notice! > > - Eri

r320471 - [SemaCodeComplete] Allow passing out scope specifiers in qualified-id completions via completion context.

2017-12-12 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Dec 12 03:35:46 2017 New Revision: 320471 URL: http://llvm.org/viewvc/llvm-project?rev=320471&view=rev Log: [SemaCodeComplete] Allow passing out scope specifiers in qualified-id completions via completion context. Reviewers: ilya-biryukov, arphaman Reviewed By: arphaman

r320563 - [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-12-13 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Dec 13 02:26:49 2017 New Revision: 320563 URL: http://llvm.org/viewvc/llvm-project?rev=320563&view=rev Log: [Sema] Ignore decls in namespaces when global decls are not wanted. Summary: ... in qualified code completion and decl lookup. Reviewers: ilya-biryukov, arphaman

r309548 - Added `applyAtomicChanges` function.

2017-07-31 Thread Eric Liu via cfe-commits
Author: ioeric Date: Mon Jul 31 02:22:34 2017 New Revision: 309548 URL: http://llvm.org/viewvc/llvm-project?rev=309548&view=rev Log: Added `applyAtomicChanges` function. This re-commits r298913. o See thread http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20170327/189084.html o Tested wi

r316653 - [Tooling] A new framework for executing clang frontend actions.

2017-10-26 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Oct 26 03:38:14 2017 New Revision: 316653 URL: http://llvm.org/viewvc/llvm-project?rev=316653&view=rev Log: [Tooling] A new framework for executing clang frontend actions. Summary: This defines a `clang::tooling::ToolExecutor` interface that can be extended to support di

Re: [PATCH] D34272: [Tooling] A new framework for executing clang frontend actions.

2017-10-26 Thread Eric Liu via cfe-commits
Sorry about that! I'm fixing these now... On Thu, Oct 26, 2017 at 2:50 PM Bjorn Pettersson via Phabricator < revi...@reviews.llvm.org> wrote: > bjope added a comment. > > I get errors when compiling due to this commit: > > FAILED: > tools/clang/lib/Tooling/CMakeFiles/clangTooling.dir/Standalone

r316661 - Try to fix warnings and windows test failures caused by r316653

2017-10-26 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Oct 26 06:09:50 2017 New Revision: 316661 URL: http://llvm.org/viewvc/llvm-project?rev=316661&view=rev Log: Try to fix warnings and windows test failures caused by r316653 Modified: cfe/trunk/lib/Tooling/StandaloneExecution.cpp cfe/trunk/unittests/Tooling/Executio

Re: [PATCH] D34272: [Tooling] A new framework for executing clang frontend actions.

2017-10-26 Thread Eric Liu via cfe-commits
r316661 should fix these (hopefully!). On Thu, Oct 26, 2017 at 3:03 PM Eric Liu wrote: > Sorry about that! I'm fixing these now... > > > On Thu, Oct 26, 2017 at 2:50 PM Bjorn Pettersson via Phabricator < > revi...@reviews.llvm.org> wrote: > >> bjope added a comment. >> >> I get errors when compi

Re: r316653 - [Tooling] A new framework for executing clang frontend actions.

2017-10-26 Thread Eric Liu via cfe-commits
hile I was writing this email in 316661 :-) ? > > Thank you, > > [*] http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15/builds/12511 > > -- > Maxim Kuvyrkov > www.linaro.org > > > > > On Oct 26, 2017, at 1:38 PM, Eric Liu via cfe-commits < > cfe-com

Re: r316653 - [Tooling] A new framework for executing clang frontend actions.

2017-10-26 Thread Eric Liu via cfe-commits
you, >> >> [*] >> http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15/builds/12511 >> >> -- >> Maxim Kuvyrkov >> www.linaro.org >> >> >> >> > On Oct 26, 2017, at 1:38 PM, Eric Liu via cfe-commits < >> cfe-commits@lists

r317205 - Fix clang-format CLion integration bug.

2017-11-02 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Nov 2 05:48:48 2017 New Revision: 317205 URL: http://llvm.org/viewvc/llvm-project?rev=317205&view=rev Log: Fix clang-format CLion integration bug. CLion's Sax parser threw this error: Failed to parse clang-format XML replacements. Input: [...] [org.xml.sax.SAXParseExc

r317328 - [Tooling] Put createExecutorFromCommandLineArgs implementation in a wrapper. NFC

2017-11-03 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri Nov 3 08:20:57 2017 New Revision: 317328 URL: http://llvm.org/viewvc/llvm-project?rev=317328&view=rev Log: [Tooling] Put createExecutorFromCommandLineArgs implementation in a wrapper. NFC Modified: cfe/trunk/include/clang/Tooling/Execution.h cfe/trunk/lib/Tooling

r317332 - [Tooling] Fix linking of StandaloneToolExecutorPlugin.

2017-11-03 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri Nov 3 08:57:27 2017 New Revision: 317332 URL: http://llvm.org/viewvc/llvm-project?rev=317332&view=rev Log: [Tooling] Fix linking of StandaloneToolExecutorPlugin. Modified: cfe/trunk/lib/Tooling/Execution.cpp cfe/trunk/lib/Tooling/StandaloneExecution.cpp cfe/t

[clang-tools-extra] r317333 - Use ToolExecutor framework in the sample tool-template.

2017-11-03 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri Nov 3 09:03:56 2017 New Revision: 317333 URL: http://llvm.org/viewvc/llvm-project?rev=317333&view=rev Log: Use ToolExecutor framework in the sample tool-template. Modified: clang-tools-extra/trunk/tool-template/CMakeLists.txt clang-tools-extra/trunk/tool-template

r317466 - [Tooling] Test internal::createExecutorFromCommandLineArgsImpl instead of the wrapper.

2017-11-06 Thread Eric Liu via cfe-commits
Author: ioeric Date: Mon Nov 6 01:29:09 2017 New Revision: 317466 URL: http://llvm.org/viewvc/llvm-project?rev=317466&view=rev Log: [Tooling] Test internal::createExecutorFromCommandLineArgsImpl instead of the wrapper. Modified: cfe/trunk/unittests/Tooling/ExecutionTest.cpp Modified: cfe/t

r317577 - [clang-refactor] Use ClangTool more explicitly by making refaroing actions AST frontend actions.

2017-11-07 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Nov 7 06:35:03 2017 New Revision: 317577 URL: http://llvm.org/viewvc/llvm-project?rev=317577&view=rev Log: [clang-refactor] Use ClangTool more explicitly by making refaroing actions AST frontend actions. Summary: This is a refactoring change. NFC Reviewers: arphaman, h

[clang-tools-extra] r289672 - [change-namespace] don't crash when type reference is in function type parameter list.

2016-12-14 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Dec 14 11:01:52 2016 New Revision: 289672 URL: http://llvm.org/viewvc/llvm-project?rev=289672&view=rev Log: [change-namespace] don't crash when type reference is in function type parameter list. Reviewers: hokein Subscribers: cfe-commits Differential Revision: https://

[clang-tools-extra] r289799 - [change-namespace] handling templated type aliases correctly.

2016-12-15 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Dec 15 04:42:35 2016 New Revision: 289799 URL: http://llvm.org/viewvc/llvm-project?rev=289799&view=rev Log: [change-namespace] handling templated type aliases correctly. Summary: This fixes templated type aliases and templated type aliases in classes. Reviewers: hokein

[clang-tools-extra] r289816 - [change-namespace] fix a case references to templated using alias are qualified types.

2016-12-15 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Dec 15 07:02:41 2016 New Revision: 289816 URL: http://llvm.org/viewvc/llvm-project?rev=289816&view=rev Log: [change-namespace] fix a case references to templated using alias are qualified types. Modified: clang-tools-extra/trunk/change-namespace/ChangeNamespace.cpp

r290093 - [clang-format] revert an unintended change in r288493 and add a test case.

2016-12-19 Thread Eric Liu via cfe-commits
Author: ioeric Date: Mon Dec 19 04:41:05 2016 New Revision: 290093 URL: http://llvm.org/viewvc/llvm-project?rev=290093&view=rev Log: [clang-format] revert an unintended change in r288493 and add a test case. Modified: cfe/trunk/lib/Format/Format.cpp cfe/trunk/unittests/Format/CleanupTest.

Re: r288493 - [ClangFormat] Only insert #include into the #include block in the beginning of the file.

2016-12-19 Thread Eric Liu via cfe-commits
Hi Mehdi, This is an unintended change. I've reverted this line and added a test case for this in r290093. Thanks, Eric On Fri, Dec 16, 2016 at 7:02 PM Mehdi Amini wrote: Hi Eric, > On Dec 2, 2016, at 3:01 AM, Eric Liu via cfe-commits < cfe-commits@lists.llvm.org> wrote: >

[clang-tools-extra] r290176 - [change-namespace] do not fix calls to overloaded operator functions.

2016-12-20 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Dec 20 08:39:04 2016 New Revision: 290176 URL: http://llvm.org/viewvc/llvm-project?rev=290176&view=rev Log: [change-namespace] do not fix calls to overloaded operator functions. Summary: Also make sure one function reference is only processed once. Reviewers: hokein Sub

[clang-tools-extra] r290421 - [change-namespace] consider namespace aliases to shorten qualified names.

2016-12-23 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri Dec 23 04:47:09 2016 New Revision: 290421 URL: http://llvm.org/viewvc/llvm-project?rev=290421&view=rev Log: [change-namespace] consider namespace aliases to shorten qualified names. Reviewers: hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.o

[clang-tools-extra] r290966 - [change-namespace] get newlines around moved namespace right.

2017-01-04 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Jan 4 08:49:08 2017 New Revision: 290966 URL: http://llvm.org/viewvc/llvm-project?rev=290966&view=rev Log: [change-namespace] get newlines around moved namespace right. Summary: Previously, a `\n` might be left in the old namespace and thus not copied to the new namespa

Re: [PATCH] D23279: clang-reorder-fields

2016-08-24 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: clang-reorder-fields/ReorderFieldsAction.h:31 @@ +30,3 @@ + +public: + ReorderFieldsAction( alexshap wrote: > alexshap wrote: > > djasper wrote: > > > I don't why clang-rename does what it does at the moment. My main poin

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-02 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 70155. ioeric added a comment. - Minor cleanup. https://reviews.llvm.org/D24183 Files: CMakeLists.txt change-namespace/CMakeLists.txt change-namespace/ChangeNamespace.cpp change-namespace/ChangeNamespace.h change-namespace/tool/CMakeLists.txt cha

Re: [PATCH] D24192: [clang-refactor] introducing clang-refactor

2016-09-02 Thread Eric Liu via cfe-commits
ioeric added a comment. - You mentioned a design doc in the summary; maybe also include a link to it? - It would make the review easier if you could separate the migration of clang-rename into another patch...I think clang-refactor is really the interesting part here. And maybe also add a small

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-02 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 70173. ioeric added a comment. - removed unintended changes. https://reviews.llvm.org/D24183 Files: CMakeLists.txt change-namespace/CMakeLists.txt change-namespace/ChangeNamespace.cpp change-namespace/ChangeNamespace.h change-namespace/tool/CMakeLi

Re: [PATCH] D24192: [clang-refactor] introducing clang-refactor

2016-09-02 Thread Eric Liu via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D24192#533174, @omtcyfz wrote: > In https://reviews.llvm.org/D24192#532981, @ioeric wrote: > > > - It would make the review easier if you could separate the migration of > > clang-rename into another patch... > > > Another point is that if I tr

Re: [PATCH] D24192: [clang-refactor] introducing clang-refactor

2016-09-02 Thread Eric Liu via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D24192#533082, @omtcyfz wrote: > In https://reviews.llvm.org/D24192#532981, @ioeric wrote: > > > - You mentioned a design doc in the summary; maybe also include a link to > > it? > > > Done. > > > - It would make the review easier if you could

Re: [PATCH] D24192: [clang-refactor] introducing clang-refactor

2016-09-02 Thread Eric Liu via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D24192#533200, @omtcyfz wrote: > In https://reviews.llvm.org/D24192#533198, @ioeric wrote: > > > In https://reviews.llvm.org/D24192#533174, @omtcyfz wrote: > > > > > In https://reviews.llvm.org/D24192#532981, @ioeric wrote: > > > > > > > - It wo

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-05 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 70308. ioeric marked 4 inline comments as done. ioeric added a comment. - Addressed review comments. https://reviews.llvm.org/D24183 Files: CMakeLists.txt change-namespace/CMakeLists.txt change-namespace/ChangeNamespace.cpp change-namespace/ChangeNam

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-05 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: change-namespace/ChangeNamespace.cpp:22 @@ +21,3 @@ + (void)NS.ltrim(':'); + return NS.str(); +} Yes, it is added to please `LLVM_ATTRIBUTE_UNUSED_RESULT` of `llvm::StringRef::ltrim`. Comment at: chan

Re: [PATCH] D24243: [clang-move] A prototype tool for moving class definition to new file.

2016-09-06 Thread Eric Liu via cfe-commits
ioeric added a comment. NIce! Some initial comments. Comment at: clang-move/ClangMove.cpp:38 @@ +37,3 @@ + const clang::Module * /*Imported*/) override { +if (const auto *FileEntry = SM.getFileEntryForID(SM.getFileID(HashLoc))) { + if (IsAngled)

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-06 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 70465. ioeric marked 10 inline comments as done. ioeric added a comment. - Addressed some review comments. https://reviews.llvm.org/D24183 Files: CMakeLists.txt change-namespace/CMakeLists.txt change-namespace/ChangeNamespace.cpp change-namespace/Cha

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-07 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: change-namespace/ChangeNamespace.cpp:21 @@ +20,3 @@ +inline std::string formatNamespace(llvm::StringRef NS) { + (void)NS.ltrim(':'); + return NS.str(); hokein wrote: > this statement doesn't do the intended thing (It won

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-07 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 70588. ioeric marked 9 inline comments as done. ioeric added a comment. Herald added a subscriber: beanz. - Addressed reviewer comments. https://reviews.llvm.org/D24183 Files: CMakeLists.txt change-namespace/CMakeLists.txt change-namespace/ChangeNamesp

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-07 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: change-namespace/ChangeNamespace.cpp:125 @@ +124,3 @@ +// applying all existing Replaces first if there is conflict. +void addOrMergeReplacement(const tooling::Replacement &R, + tooling::Replacements *Replaces) {

Re: [PATCH] D24243: [clang-move] A prototype tool for moving class definition to new file.

2016-09-07 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: clang-move/ClangMove.cpp:103 @@ +102,3 @@ + const clang::SourceManager *SM) { + // Gets the ending ";". + auto EndLoc = clang::Lexer::getLocForEndOfToken(D->getLocEnd(), 0, *SM, hokein

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-08 Thread Eric Liu via cfe-commits
ioeric added a comment. Ping https://reviews.llvm.org/D24183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-09 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: change-namespace/ChangeNamespace.cpp:85 @@ +84,3 @@ + +SourceLocation getStartOfNextLine(SourceLocation Loc, const SourceManager &SM, + const LangOptions &LangOpts) { omtcyfz wrote: > Would

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-09 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 70793. ioeric marked 16 inline comments as done. ioeric added a comment. - Addressed reviewer comments. https://reviews.llvm.org/D24183 Files: CMakeLists.txt change-namespace/CMakeLists.txt change-namespace/ChangeNamespace.cpp change-namespace/Change

[PATCH] D24383: Add addOrMerge interface to tooling::Replacements.

2016-09-09 Thread Eric Liu via cfe-commits
ioeric created this revision. ioeric added reviewers: klimek, djasper. ioeric added subscribers: alexshap, hokein, omtcyfz, cfe-commits. Herald added a subscriber: klimek. https://reviews.llvm.org/D24383 Files: include/clang/Tooling/Core/Replacement.h lib/Tooling/Core/Replacement.cpp unitte

[PATCH] D24400: Also cleanup comments around redundant colons/commas in format::cleanup.

2016-09-09 Thread Eric Liu via cfe-commits
ioeric created this revision. ioeric added a reviewer: djasper. ioeric added a subscriber: cfe-commits. Herald added a subscriber: klimek. https://reviews.llvm.org/D24400 Files: lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: unittests/Format/CleanupTest.cpp ===

Re: [PATCH] D24400: Also cleanup comments around redundant colons/commas in format::cleanup.

2016-09-09 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 70863. ioeric marked an inline comment as done. ioeric added a comment. - Addressed review comments. https://reviews.llvm.org/D24400 Files: lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: unittests/Format/CleanupTest.cpp ==

Re: [PATCH] D24400: Also cleanup comments around redundant colons/commas in format::cleanup.

2016-09-09 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: lib/Format/Format.cpp:1136 @@ +1135,3 @@ +for (auto *Tok = Left->Next; Tok && Tok != Right; Tok = Tok->Next) + if (Tok->is(tok::comment)) +deleteToken(Tok); djasper wrote: > Hm. I think this "i

Re: [PATCH] D24400: Also cleanup comments around redundant colons/commas in format::cleanup.

2016-09-09 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 70865. ioeric marked an inline comment as done. ioeric added a comment. - Addressed review comments. https://reviews.llvm.org/D24400 Files: lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: unittests/Format/CleanupTest.cpp ==

r281064 - Also cleanup comments around redundant colons/commas in format::cleanup.

2016-09-09 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri Sep 9 12:50:49 2016 New Revision: 281064 URL: http://llvm.org/viewvc/llvm-project?rev=281064&view=rev Log: Also cleanup comments around redundant colons/commas in format::cleanup. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://review

Re: [PATCH] D24400: Also cleanup comments around redundant colons/commas in format::cleanup.

2016-09-09 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL281064: Also cleanup comments around redundant colons/commas in format::cleanup. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D24400?vs=70865&id=70867#toc Repository: rL LL

Re: [PATCH] D24380: [migrate-tool] Framework for a codebase-dependent migration tool.

2016-09-09 Thread Eric Liu via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D24380#538434, @Eugene.Zelenko wrote: > I think will be good idea to await clang-refactor and merge code there. This tool is not exactly a clang-tool; it is a framework that invokes multiple clang refactoring tool and also manipulates build r

Re: [PATCH] D24383: Add addOrMerge interface to tooling::Replacements.

2016-09-10 Thread Eric Liu via cfe-commits
This function has been implemented in several places, so I figure it might be useful to have this function in the library. Although I'm not sure whether this should be a class interface or just a standalone helper function. @alexshap: thanks for the explanation. For your point B, I'm not sure abo

Re: [PATCH] D24383: Add addOrMerge interface to tooling::Replacements.

2016-09-12 Thread Eric Liu via cfe-commits
ioeric added a comment. @djasper Thanks for the insight into the problem. For the cases you listed, I have added some test cases. Case 1-3 can be handled as expected. And you are right, the behavior for case 4 is interesting. But I still agree that `addOrMerge` is confusing. As you said, the in

Re: [PATCH] D24383: Add addOrMerge interface to tooling::Replacements.

2016-09-12 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 71006. ioeric added a comment. - Also cleanup comments around redundant colons/commas in format::cleanup. https://reviews.llvm.org/D24383 Files: include/clang/Tooling/Core/Replacement.h lib/Tooling/Core/Replacement.cpp unittests/Tooling/RefactoringTest

Re: [PATCH] D24383: Add addOrMerge interface to tooling::Replacements.

2016-09-12 Thread Eric Liu via cfe-commits
Somehow the commit message was wrong...should be "Added more test cases" instead. On Mon, Sep 12, 2016 at 4:38 PM Eric Liu wrote: > ioeric updated this revision to Diff 71006. > ioeric added a comment. > > - Also cleanup comments around redundant colons/commas in format::cleanup. > > > https://r

Re: [PATCH] D24383: Add addOrMerge interface to tooling::Replacements.

2016-09-12 Thread Eric Liu via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D24383#539942, @djasper wrote: > Ok.. Thought some more and discussed with Manuel. > > I think we should do a partial solution for now. I still think addOrMerge is > harmful and it is always never the right thing to use. The codepaths that > c

Re: [PATCH] D24380: [migrate-tool] Framework for a codebase-dependent migration tool.

2016-09-13 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 71116. ioeric marked 13 inline comments as done. ioeric added a comment. Herald added a subscriber: mgorny. - Addressed review comments. - Separate getAffectedFiles into its own interface. https://reviews.llvm.org/D24380 Files: CMakeLists.txt migrate-too

Re: [PATCH] D24380: [migrate-tool] Framework for a codebase-dependent migration tool.

2016-09-13 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: migrate-tool/HeaderBuild.h:29 @@ +28,3 @@ + + std::string generateContent() const; + klimek wrote: > This all needs more comments :) > I assume we'll also need to somehow give this a "style" at some point? Or > alternati

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-13 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 71126. ioeric marked 13 inline comments as done. ioeric added a comment. Herald added a subscriber: mgorny. - Minor cleanup. https://reviews.llvm.org/D24183 Files: CMakeLists.txt change-namespace/CMakeLists.txt change-namespace/ChangeNamespace.cpp ch

Re: [PATCH] D24383: Add addOrMerge interface to tooling::Replacements.

2016-09-13 Thread Eric Liu via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D24383#540296, @djasper wrote: > The problem is that it is implicit behavior, that's not easy to understand. > What's worse is that the behavior of add and merge would fundamentally be > reverse. If you add two inserts at the same location, th

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-13 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: change-namespace/ChangeNamespace.cpp:359 @@ +358,3 @@ + End, tok::semi, *Result.SourceManager, Result.Context->getLangOpts(), + /*SkipTrailingWhitespaceAndNewLine=*/true); + if (AfterSemi.isValid()) omtcyfz wrot

[PATCH] D24501: Remove redundant comma around parenthesis in parameter list.

2016-09-13 Thread Eric Liu via cfe-commits
ioeric created this revision. ioeric added a reviewer: djasper. ioeric added a subscriber: cfe-commits. Herald added a subscriber: klimek. https://reviews.llvm.org/D24501 Files: lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: unittests/Format/CleanupTest.cpp ===

Re: [PATCH] D24501: Remove redundant comma around parenthesis in parameter list.

2016-09-13 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 71158. ioeric marked an inline comment as done. ioeric added a comment. - Refactored cleanup unittest; added more test cases for trailing commas. https://reviews.llvm.org/D24501 Files: lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: unitte

Re: [PATCH] D24501: Remove redundant comma around parenthesis in parameter list.

2016-09-13 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: unittests/Format/CleanupTest.cpp:147 @@ +146,3 @@ + // Trailing comma in braces is not removed. + std::string Code = "void f() { std::vector v = {1,2,,,3,{4,5,}}; }"; + std::string Expected = "void f() { std::vector v = {1,2,3,{4,5,}};

Re: [PATCH] D24501: Remove redundant comma around parenthesis in parameter list.

2016-09-13 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 71174. ioeric marked 2 inline comments as done. ioeric added a comment. - Minor cleanup. https://reviews.llvm.org/D24501 Files: lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: unittests/Format/CleanupTest.cpp ==

Re: [PATCH] D24501: Remove redundant comma around parenthesis in parameter list.

2016-09-13 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: unittests/Format/CleanupTest.cpp:125 @@ -123,7 +124,3 @@ std::string Expected = "class A {\nA() {} };"; - std::vector Ranges; - Ranges.push_back(tooling::Range(17, 0)); - Ranges.push_back(tooling::Range(19, 0)); - std::string Resul

Re: [PATCH] D24501: Remove redundant comma around parenthesis in parameter list.

2016-09-13 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL281344: Remove redundant comma around parenthesis in parameter list. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D24501?vs=71174&id=71175#toc Repository: rL LLVM https://

r281344 - Remove redundant comma around parenthesis in parameter list.

2016-09-13 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Sep 13 10:02:43 2016 New Revision: 281344 URL: http://llvm.org/viewvc/llvm-project?rev=281344&view=rev Log: Remove redundant comma around parenthesis in parameter list. Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D

[PATCH] D24515: Supports adding insertion around non-insertion replacements.

2016-09-13 Thread Eric Liu via cfe-commits
ioeric created this revision. ioeric added reviewers: djasper, klimek. ioeric added a subscriber: cfe-commits. Herald added a subscriber: klimek. Extend `tooling::Replacements::add()` to support adding order-independent replacements. Two replacements are considered order-independent if one of th

Re: [PATCH] D24383: Add addOrMerge interface to tooling::Replacements.

2016-09-14 Thread Eric Liu via cfe-commits
ioeric abandoned this revision. ioeric added a comment. Abandon in favor of https://reviews.llvm.org/D24515 https://reviews.llvm.org/D24383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

r281452 - Revert "[modules] When merging one definition into another, propagate the list of re-exporting modules from the discarded definition to the retained definition."

2016-09-14 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Sep 14 05:05:10 2016 New Revision: 281452 URL: http://llvm.org/viewvc/llvm-project?rev=281452&view=rev Log: Revert "[modules] When merging one definition into another, propagate the list of re-exporting modules from the discarded definition to the retained definition."

Re: [PATCH] D24515: Supports adding insertion around non-insertion replacements.

2016-09-14 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 71332. ioeric marked an inline comment as done. ioeric added a comment. - Addressed comment. https://reviews.llvm.org/D24515 Files: include/clang/Tooling/Core/Replacement.h lib/Tooling/Core/Replacement.cpp unittests/Tooling/RefactoringTest.cpp Index:

Re: [PATCH] D24515: Supports adding insertion around non-insertion replacements.

2016-09-14 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 71335. ioeric added a comment. - Updated comment. https://reviews.llvm.org/D24515 Files: include/clang/Tooling/Core/Replacement.h lib/Tooling/Core/Replacement.cpp unittests/Tooling/RefactoringTest.cpp Index: unittests/Tooling/RefactoringTest.cpp =

Re: [PATCH] D24515: Supports adding insertion around non-insertion replacements.

2016-09-14 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL281457: Supports adding insertion around non-insertion replacements. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D24515?vs=71335&id=71337#toc Repository: rL LLVM https://

r281457 - Supports adding insertion around non-insertion replacements.

2016-09-14 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Sep 14 08:04:51 2016 New Revision: 281457 URL: http://llvm.org/viewvc/llvm-project?rev=281457&view=rev Log: Supports adding insertion around non-insertion replacements. Summary: Extend `tooling::Replacements::add()` to support adding order-independent replacements. Two

Re: r281452 - Revert "[modules] When merging one definition into another, propagate the list of re-exporting modules from the discarded definition to the retained definition."

2016-09-14 Thread Eric Liu via cfe-commits
e commit message. > > On Sep 14, 2016 6:13 AM, "Eric Liu via cfe-commits" < > cfe-commits@lists.llvm.org> wrote: > > Author: ioeric > Date: Wed Sep 14 05:05:10 2016 > New Revision: 281452 > > URL: http://llvm.org/viewvc/llvm-project?rev=281452&view=rev

Re: [PATCH] D24572: [clang-tidy] Clean up code after applying replacements.

2016-09-15 Thread Eric Liu via cfe-commits
ioeric requested changes to this revision. This revision now requires changes to proceed. Comment at: clang-tidy/ClangTidy.cpp:25 @@ -24,2 +24,3 @@ #include "clang/ASTMatchers/ASTMatchFinder.h" +#include "clang/Format/Format.h" #include "clang/Frontend/ASTConsumers.h" --

Re: [PATCH] D24380: [migrate-tool] Framework for a codebase-dependent migration tool.

2016-09-15 Thread Eric Liu via cfe-commits
ioeric added a comment. Ping https://reviews.llvm.org/D24380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24606: Recommit r281457 "Supports adding insertion around non-insertion replacements" and fix a bug in getAffectedRanges.

2016-09-15 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 71495. ioeric added a comment. - Update comment in `getAffectedRanges`. https://reviews.llvm.org/D24606 Files: include/clang/Tooling/Core/Replacement.h lib/Tooling/Core/Replacement.cpp unittests/Tooling/RefactoringTest.cpp Index: unittests/Tooling/Ref

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-15 Thread Eric Liu via cfe-commits
ioeric added a comment. PIng https://reviews.llvm.org/D24183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24243: [clang-move] A prototype tool for moving class definition to new file.

2016-09-16 Thread Eric Liu via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lg Comment at: unittests/clang-move/ClangMoveTests.cpp:122 @@ +121,3 @@ + +const char ExpectedNewCC[] = "#include \"foo.h\"\n" + "namespace a {\n"

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-16 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 71605. ioeric marked 8 inline comments as done. ioeric added a comment. - Addressed review comments. https://reviews.llvm.org/D24183 Files: CMakeLists.txt change-namespace/CMakeLists.txt change-namespace/ChangeNamespace.cpp change-namespace/ChangeNam

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-16 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: change-namespace/ChangeNamespace.cpp:200 @@ +199,3 @@ + while (!NsSplitted.empty()) { +// FIXME: consider code style for comments. +Code = ("namespace " + NsSplitted.back() + " {\n" + Code + hokein wrote: > Doesn'

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-16 Thread Eric Liu via cfe-commits
ioeric marked an inline comment as done. Comment at: change-namespace/ChangeNamespace.cpp:448 @@ +447,3 @@ + continue; +const std::string &FilePath = FileAndNsMoves.first; +auto &Replaces = FileToReplacements[FilePath]; omtcyfz wrote: > `StringRef` he

[PATCH] D24663: When replacements have the same offset, make replacements with smaller length order first in the set.

2016-09-16 Thread Eric Liu via cfe-commits
ioeric created this revision. ioeric added a reviewer: djasper. ioeric added a subscriber: cfe-commits. Herald added a subscriber: klimek. https://reviews.llvm.org/D24663 Files: include/clang/Tooling/Core/Replacement.h lib/Tooling/Core/Replacement.cpp Index: lib/Tooling/Core/Replacement.cpp

Re: [PATCH] D24663: When replacements have the same offset, make replacements with smaller length order first in the set.

2016-09-16 Thread Eric Liu via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D24663#544993, @klimek wrote: > Test? Why are we doing this (should go into the CL description)? There is no behavioral change intended, and the goal here is not to break any test. A test for this change can be having an insertion and a delet

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-16 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 71689. ioeric marked 4 inline comments as done. ioeric added a comment. - Updated commenting, and fix a bug in the binary. https://reviews.llvm.org/D24183 Files: CMakeLists.txt change-namespace/CMakeLists.txt change-namespace/ChangeNamespace.cpp chan

[clang-tools-extra] r298090 - [change-namespace] do not rename specialized template parameters.

2017-03-17 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri Mar 17 09:05:39 2017 New Revision: 298090 URL: http://llvm.org/viewvc/llvm-project?rev=298090&view=rev Log: [change-namespace] do not rename specialized template parameters. Reviewers: hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D3107

[clang-tools-extra] r298363 - [change-namespace] avoid adding leading '::' when possible.

2017-03-21 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Mar 21 07:41:59 2017 New Revision: 298363 URL: http://llvm.org/viewvc/llvm-project?rev=298363&view=rev Log: [change-namespace] avoid adding leading '::' when possible. Summary: When changing namespaces, the tool adds leading "::" to references that need to be fully-qualif

r298912 - [ASTMatchers] add typeAliasTemplateDecl matcher.

2017-03-28 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Mar 28 07:56:47 2017 New Revision: 298912 URL: http://llvm.org/viewvc/llvm-project?rev=298912&view=rev Log: [ASTMatchers] add typeAliasTemplateDecl matcher. Reviewers: hokein, aaron.ballman Reviewed By: aaron.ballman Subscribers: aaron.ballman, cfe-commits, klimek Diff

r298913 - Added `applyAtomicChanges` function.

2017-03-28 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Mar 28 08:05:32 2017 New Revision: 298913 URL: http://llvm.org/viewvc/llvm-project?rev=298913&view=rev Log: Added `applyAtomicChanges` function. Summary: ... which applies a set of `AtomicChange`s on code. Reviewers: klimek, djasper Reviewed By: djasper Subscribers: cf

r298919 - Try to unbreak buildbots after r298913.

2017-03-28 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Mar 28 08:56:19 2017 New Revision: 298919 URL: http://llvm.org/viewvc/llvm-project?rev=298919&view=rev Log: Try to unbreak buildbots after r298913. Modified: cfe/trunk/unittests/Tooling/RefactoringTest.cpp Modified: cfe/trunk/unittests/Tooling/RefactoringTest.cpp URL

Re: [PATCH] D30777: Added `applyAtomicChanges` function.

2017-03-28 Thread Eric Liu via cfe-commits
Thank you Nakamura! On Tue, Mar 28, 2017, 16:35 NAKAMURA Takumi via Phabricator < revi...@reviews.llvm.org> wrote: > chapuni added inline comments. > > > > Comment at: cfe/trunk/include/clang/Tooling/Refactoring/AtomicChange.h:19 > #include "clang/Basic/SourceManager.h" > +#incl

<    1   2   3   4   5   6   7   8   9   10   >