[PATCH] D20734: [clang-format] insert new #includes into correct blocks when cleaning up Replacement with cleanupAroundReplacements().

2016-05-27 Thread Eric Liu via cfe-commits
ioeric created this revision. ioeric added reviewers: djasper, klimek. ioeric added subscribers: bkramer, cfe-commits. Herald added a subscriber: klimek. When a replacement's offset is set to UINT_MAX or -1U, it is treated as a header insertion replacement by cleanupAroundReplacements(). The new

r270971 - [clang-format] moved unit tests related to replacements cleaner from FormatTest.cpp to CleanUpTest.cpp.

2016-05-27 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri May 27 03:20:02 2016 New Revision: 270971 URL: http://llvm.org/viewvc/llvm-project?rev=270971=rev Log: [clang-format] moved unit tests related to replacements cleaner from FormatTest.cpp to CleanUpTest.cpp. Modified: cfe/trunk/unittests/Format/CleanupTest.cpp

Re: [PATCH] D20621: [include-fixer] Create a mode in vim integration to show multiple potential headers.

2016-05-25 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: include-fixer/IncludeFixer.cpp:241 @@ +240,3 @@ + IncludeFixerContext + GetIncludeFixerContext(const clang::SourceManager , + clang::HeaderSearch ) { I think function name should start with lower

Re: [PATCH] D20621: [include-fixer] Create a mode in vim integration to show multiple potential headers.

2016-05-25 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: include-fixer/IncludeFixer.cpp:241 @@ -280,5 +240,3 @@ /// \return true if changes will be made, false otherwise. - bool Rewrite(clang::SourceManager , - clang::HeaderSearch , - std::set , -

[clang-tools-extra] r270703 - [include-fixer] /usr/include/xlocal.h to include/xlocal.h in hardcoded map.

2016-05-25 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed May 25 09:17:09 2016 New Revision: 270703 URL: http://llvm.org/viewvc/llvm-project?rev=270703=rev Log: [include-fixer] /usr/include/xlocal.h to include/xlocal.h in hardcoded map. Modified:

Re: [PATCH] D20619: [include-fixer] moved STLPostfixMap into findAllSymbols library and make it a static variable in function.

2016-05-25 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL270696: [include-fixer] moved STLPostfixMap into findAllSymbols library and make it a… (authored by ioeric). Changed prior to commit: http://reviews.llvm.org/D20619?vs=58408=58410#toc Repository: rL

[clang-tools-extra] r270696 - [include-fixer] moved STLPostfixMap into findAllSymbols library and make it a static variable in function.

2016-05-25 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed May 25 08:53:33 2016 New Revision: 270696 URL: http://llvm.org/viewvc/llvm-project?rev=270696=rev Log: [include-fixer] moved STLPostfixMap into findAllSymbols library and make it a static variable in function. Summary: [include-fixer] moved STLPostfixMap into

[clang-tools-extra] r270578 - [include-fixer][find-all-symbols] added missing dependencies.

2016-05-24 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue May 24 11:35:24 2016 New Revision: 270578 URL: http://llvm.org/viewvc/llvm-project?rev=270578=rev Log: [include-fixer][find-all-symbols] added missing dependencies. Modified: clang-tools-extra/trunk/include-fixer/find-all-symbols/CMakeLists.txt Modified:

[clang-tools-extra] r270571 - [include-fixer][find-all-symbols] removed unused const member from YamlReporter to fix build bot failure.

2016-05-24 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue May 24 10:34:37 2016 New Revision: 270571 URL: http://llvm.org/viewvc/llvm-project?rev=270571=rev Log: [include-fixer][find-all-symbols] removed unused const member from YamlReporter to fix build bot failure. Modified:

Re: [PATCH] D20566: [find-all-symbols] Added hardcode header mapping from header postfix to header name for STL symbols.

2016-05-24 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL270566: [find-all-symbols] Added hardcode header mapping from header postfix to… (authored by ioeric). Changed prior to commit: http://reviews.llvm.org/D20566?vs=58235=58237#toc Repository: rL LLVM

[clang-tools-extra] r270566 - [find-all-symbols] Added hardcode header mapping from header postfix to header name for STL symbols.

2016-05-24 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue May 24 10:10:58 2016 New Revision: 270566 URL: http://llvm.org/viewvc/llvm-project?rev=270566=rev Log: [find-all-symbols] Added hardcode header mapping from header postfix to header name for STL symbols. Summary: [find-all-symbols] Added hardcode header mapping from

Re: [PATCH] D20566: [find-all-symbols] Added hardcode header mapping from header postfix to header name for STL symbols.

2016-05-24 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 58235. ioeric marked 3 inline comments as done. ioeric added a comment. - Fixed postfix header mapping. http://reviews.llvm.org/D20566 Files: include-fixer/find-all-symbols/CMakeLists.txt include-fixer/find-all-symbols/FindAllMacros.cpp

Re: [PATCH] D20566: [find-all-symbols] Added hardcode header mapping from header postfix to header name for STL symbols.

2016-05-24 Thread Eric Liu via cfe-commits
ioeric added a comment. This patch is now ready for review. Sorry that I also refactored `FindAllSymbolsAction` into a separate file in this patch...should've done that in a separate patch at the very beginning. http://reviews.llvm.org/D20566 ___

Re: [PATCH] D20566: [find-all-symbols] Added hardcode header mapping from header postfix to header name for STL symbols.

2016-05-24 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 58228. ioeric added a comment. - fixed nits. http://reviews.llvm.org/D20566 Files: include-fixer/find-all-symbols/CMakeLists.txt include-fixer/find-all-symbols/FindAllMacros.cpp include-fixer/find-all-symbols/FindAllSymbols.cpp

[PATCH] D20566: [find-all-symbols] Added hardcode header mapping from header postfix to header name for STL symbols.

2016-05-24 Thread Eric Liu via cfe-commits
ioeric created this revision. ioeric added reviewers: bkramer, klimek. ioeric added subscribers: hokein, cfe-commits. [find-all-symbols] Added hardcode header mapping from header postfix to header name for STL symbols. http://reviews.llvm.org/D20566 Files:

Re: [PATCH] D20496: [include-fixer] Added find-stl-symbols to retrieve symbols (with the correct include header name) from C++ standard STL headers.

2016-05-23 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 58081. ioeric added a comment. - removed redundant dependency for findAllSymbols. http://reviews.llvm.org/D20496 Files: include-fixer/CMakeLists.txt include-fixer/find-all-symbols/FindAllMacros.cpp include-fixer/find-all-symbols/FindAllMacros.h

[clang-tools-extra] r270202 - [find-all-symbols] fix failing unittest for Windows build bot.

2016-05-20 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri May 20 06:14:36 2016 New Revision: 270202 URL: http://llvm.org/viewvc/llvm-project?rev=270202=rev Log: [find-all-symbols] fix failing unittest for Windows build bot. Modified: clang-tools-extra/trunk/include-fixer/find-all-symbols/FindAllMacros.cpp Modified:

[clang-tools-extra] r270196 - [find-all-symbols] fixed FindAllMacros compilation error.

2016-05-20 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri May 20 04:23:19 2016 New Revision: 270196 URL: http://llvm.org/viewvc/llvm-project?rev=270196=rev Log: [find-all-symbols] fixed FindAllMacros compilation error. Modified: clang-tools-extra/trunk/include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp Modified:

[clang-tools-extra] r270193 - [find-all-symbols] make HeaderMapCollector optional in FindAllSymbols and FindAllMacros.

2016-05-20 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri May 20 04:12:01 2016 New Revision: 270193 URL: http://llvm.org/viewvc/llvm-project?rev=270193=rev Log: [find-all-symbols] make HeaderMapCollector optional in FindAllSymbols and FindAllMacros. Modified:

Re: [PATCH] D20420: [find-all-symbol] Add macro support.

2016-05-19 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: include-fixer/find-all-symbols/FindAllMacros.h:22 @@ +21,3 @@ + +/// \brief A preprocessor collects macro symbols. The contexts of a macro will +/// be ignored since they are not available during preprocessing period.

Re: [PATCH] D20370: [include-fixer] Sort headers after inserting new headers.

2016-05-19 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL270031: [include-fixer] Sort headers after inserting new headers. (authored by ioeric). Changed prior to commit: http://reviews.llvm.org/D20370?vs=57745=57746#toc Repository: rL LLVM

[clang-tools-extra] r270031 - [include-fixer] Sort headers after inserting new headers.

2016-05-19 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu May 19 03:21:09 2016 New Revision: 270031 URL: http://llvm.org/viewvc/llvm-project?rev=270031=rev Log: [include-fixer] Sort headers after inserting new headers. Summary: [include-fixer] Sort headers after inserting new headers. Reviewers: bkramer Subscribers: klimek,

Re: [PATCH] D20370: [include-fixer] Sort headers after inserting new headers.

2016-05-19 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 57745. ioeric added a comment. - Passed Headers into IncludeFixerActionFactory so that we can know which headers are added. http://reviews.llvm.org/D20370 Files: include-fixer/CMakeLists.txt include-fixer/IncludeFixer.cpp include-fixer/IncludeFixer.h

Re: [PATCH] D20329: [clang-include-fixer] Added Vim integration for clang-include-fixer.

2016-05-18 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL269927: [clang-include-fixer] Added Vim integration for clang-include-fixer. (authored by ioeric). Changed prior to commit: http://reviews.llvm.org/D20329?vs=57615=57618#toc Repository: rL LLVM

[clang-tools-extra] r269927 - [clang-include-fixer] Added Vim integration for clang-include-fixer.

2016-05-18 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed May 18 09:10:16 2016 New Revision: 269927 URL: http://llvm.org/viewvc/llvm-project?rev=269927=rev Log: [clang-include-fixer] Added Vim integration for clang-include-fixer. Summary: [clang-include-fixer] Added Vim integration for clang-include-fixer. Reviewers: hokein,

Re: [PATCH] D20329: [clang-include-fixer] Added Vim integration for clang-include-fixer.

2016-05-18 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 57615. ioeric added a comment. - Added docs for Vim integration into include-fixer.rst. http://reviews.llvm.org/D20329 Files: docs/include-fixer.rst include-fixer/tool/ClangIncludeFixer.cpp include-fixer/tool/clang-include-fixer.py Index:

Re: [PATCH] D20362: [clang-format] Make formatReplacements() also sort #includes.

2016-05-18 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL269924: [clang-format] Make formatReplacements() also sort #includes. (authored by ioeric). Changed prior to commit: http://reviews.llvm.org/D20362?vs=57601=57612#toc Repository: rL LLVM

r269924 - [clang-format] Make formatReplacements() also sort #includes.

2016-05-18 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed May 18 08:43:48 2016 New Revision: 269924 URL: http://llvm.org/viewvc/llvm-project?rev=269924=rev Log: [clang-format] Make formatReplacements() also sort #includes. Summary: [clang-format] Make formatReplacements() also sort #includes. Reviewers: bkramer, djasper

[PATCH] D20362: [clang-format] Make formatReplacements() also sort #includes.

2016-05-18 Thread Eric Liu via cfe-commits
ioeric created this revision. ioeric added reviewers: bkramer, djasper. ioeric added a subscriber: cfe-commits. Herald added a subscriber: klimek. [clang-format] Make formatReplacements() also sort #includes. http://reviews.llvm.org/D20362 Files: lib/Format/Format.cpp

Re: [PATCH] D19804: Make clang-format cleaner remove redundant commas in list and redundant colon in constructor initializer.

2016-05-18 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL269888: Make clang-format cleaner remove redundant commas in list and redundant colon… (authored by ioeric). Changed prior to commit: http://reviews.llvm.org/D19804?vs=57146=57570#toc Repository: rL

r269888 - Make clang-format cleaner remove redundant commas in list and redundant colon in constructor initializer.

2016-05-18 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed May 18 03:02:56 2016 New Revision: 269888 URL: http://llvm.org/viewvc/llvm-project?rev=269888=rev Log: Make clang-format cleaner remove redundant commas in list and redundant colon in constructor initializer. Summary: Make clang-format cleaner remove redundant

Re: [PATCH] D20329: [clang-include-fixer] Added Vim integration for clang-include-fixer.

2016-05-17 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: include-fixer/tool/ClangIncludeFixer.cpp:51 @@ +50,3 @@ +cl::opt +VimMode("vim", +cl::desc("Run the tool on a potentially unsaved buffer from Vim"), hokein wrote: > bkramer wrote: > > This isn't really

Re: [PATCH] D20329: [clang-include-fixer] Added Vim integration for clang-include-fixer.

2016-05-17 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 57484. ioeric marked 4 inline comments as done. ioeric added a comment. - Changed VimMode to STDINMode, and made clang-include-fixer return insertion line number in this mode. - Added -db, -input options into Vim integration. http://reviews.llvm.org/D20329

Re: [PATCH] D19804: Make clang-format cleaner remove redundant commas in list and redundant colon in constructor initializer.

2016-05-13 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 57146. ioeric added a comment. - nit: add a missing space. http://reviews.llvm.org/D19804 Files: lib/Format/Format.cpp lib/Format/TokenAnnotator.cpp unittests/Format/CleanupTest.cpp Index: unittests/Format/CleanupTest.cpp

Re: [PATCH] D19804: Make clang-format cleaner remove redundant commas in list and redundant colon in constructor initializer.

2016-05-13 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: lib/Format/Format.cpp:1822 @@ +1821,3 @@ +cleanupRight(Line->First, Line->Last, tok::comma, tok::comma); +checkConstructorInitList(*Line); + } ioeric wrote: > ioeric wrote: > > djasper wrote: > > >

Re: [PATCH] D19804: Make clang-format cleaner remove redundant commas in list and redundant colon in constructor initializer.

2016-05-13 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 57145. ioeric marked 4 inline comments as done. ioeric added a comment. - Use reviewer's awesome templates for checkPair(). - Remove checkConstructorInitList(). - Moved InCtorInitializer context setting before checking tok::comma so that InCtorInitializer

Re: [PATCH] D19804: Make clang-format cleaner remove redundant commas in list and redundant colon in constructor initializer.

2016-05-13 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: lib/Format/Format.cpp:1822 @@ +1821,3 @@ +cleanupRight(Line->First, Line->Last, tok::comma, tok::comma); +checkConstructorInitList(*Line); + } ioeric wrote: > djasper wrote: > > You could turn this

Re: [PATCH] D19804: Make clang-format cleaner remove redundant commas in list and redundant colon in constructor initializer.

2016-05-13 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: lib/Format/Format.cpp:1822 @@ +1821,3 @@ +cleanupRight(Line->First, Line->Last, tok::comma, tok::comma); +checkConstructorInitList(*Line); + } djasper wrote: > You could turn this into: > > for

Re: [PATCH] D19804: Make clang-format cleaner remove redundant commas in list and redundant colon in constructor initializer.

2016-05-11 Thread Eric Liu via cfe-commits
ioeric added a comment. PING http://reviews.llvm.org/D19804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19804: Make clang-format cleaner remove redundant commas/colons in constructor initializer list.

2016-05-10 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 56696. ioeric added a comment. - Extended redundant comma cleanup to general lists, and change the way constructor initializer list is handled. Removed comments cleanup, leave it for a future patch. http://reviews.llvm.org/D19804 Files:

Re: [PATCH] D19804: Make clang-format cleaner remove redundant commas/colons in constructor initializer list.

2016-05-09 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: lib/Format/Format.cpp:1821 @@ +1820,3 @@ + if (Line->Affected) +checkConstructorInitList(*Line); +} djasper wrote: > Why are we restricting this to constructor initializers? I think we should > directly

Re: [PATCH] D19913: Added static creators that create complete instances of SymbolInfo.

2016-05-09 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: include-fixer/find-all-symbols/SymbolInfo.h:98-101 @@ +97,6 @@ + + static SymbolInfo + CreateFunctionSymbolInfo(const std::string , const std::string , + const std::vector , int LineNumber, +

Re: [PATCH] D19913: Added static creators that create complete instances of SymbolInfo.

2016-05-04 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 56147. ioeric added a comment. - Removed unused function in unit test. http://reviews.llvm.org/D19913 Files: include-fixer/InMemoryXrefsDB.cpp include-fixer/find-all-symbols/SymbolInfo.cpp include-fixer/find-all-symbols/SymbolInfo.h

Re: [PATCH] D19913: Added static creators that create complete instances of SymbolInfo.

2016-05-04 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 56145. ioeric added a comment. - Use template to compare llvm::Optional types. http://reviews.llvm.org/D19913 Files: include-fixer/InMemoryXrefsDB.cpp include-fixer/find-all-symbols/SymbolInfo.cpp include-fixer/find-all-symbols/SymbolInfo.h

Re: [PATCH] D19913: Added static creators that create complete instances of SymbolInfo.

2016-05-04 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 56143. ioeric added a comment. - Use static creator functions in SymbolInfo in FindAllSymbolTests, and make SymbolInfo::operator== compare all fields. http://reviews.llvm.org/D19913 Files: include-fixer/InMemoryXrefsDB.cpp

Re: [PATCH] D19913: Added static creators that create complete instances of SymbolInfo.

2016-05-04 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: include-fixer/find-all-symbols/SymbolInfo.h:90-93 @@ +89,6 @@ + + static SymbolInfo + CreateFunctionSymbolInfo(const std::string , const std::string , + const std::vector , int LineNumber, +

[PATCH] D19913: Added static creators that create complete instances of SymbolInfo.

2016-05-04 Thread Eric Liu via cfe-commits
ioeric created this revision. ioeric added reviewers: klimek, hokein. ioeric added a subscriber: cfe-commits. Added static creators that create complete instances of SymbolInfo. http://reviews.llvm.org/D19913 Files: include-fixer/InMemoryXrefsDB.cpp

Re: [PATCH] D19869: Added XrefsDBManager into include-fixer and made XrefsDB return SymbolInfo.

2016-05-04 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL268480: Added XrefsDBManager into include-fixer and made XrefsDB return SymbolInfo. (authored by ioeric). Changed prior to commit: http://reviews.llvm.org/D19869?vs=56104=56105#toc Repository: rL

[clang-tools-extra] r268480 - Added XrefsDBManager into include-fixer and made XrefsDB return SymbolInfo.

2016-05-04 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed May 4 03:22:35 2016 New Revision: 268480 URL: http://llvm.org/viewvc/llvm-project?rev=268480=rev Log: Added XrefsDBManager into include-fixer and made XrefsDB return SymbolInfo. Summary: Added XrefsDBManager into include-fixer and made XrefsDB return SymbolInfo.

Re: [PATCH] D19869: Added XrefsDBManager into include-fixer and made XrefsDB return SymbolInfo.

2016-05-04 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 56104. ioeric marked 8 inline comments as done. ioeric added a comment. - Added FIXMEs and fixed a nit. http://reviews.llvm.org/D19869 Files: include-fixer/CMakeLists.txt include-fixer/InMemoryXrefsDB.cpp include-fixer/InMemoryXrefsDB.h

Re: [PATCH] D19869: Added XrefsDBManager into include-fixer and made XrefsDB return SymbolInfo.

2016-05-03 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: include-fixer/IncludeFixer.h:34-35 @@ -33,3 +33,4 @@ IncludeFixerActionFactory( - XrefsDB , std::vector , + XrefsDBManager , + std::vector , bool MinimizeIncludePaths = true); klimek wrote: > That

Re: [PATCH] D19869: Added XrefsDBManager into include-fixer and made XrefsDB return SymbolInfo.

2016-05-03 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: include-fixer/InMemoryXrefsDB.cpp:24-26 @@ +23,5 @@ +for (const auto : Entry.second) { + SymbolInfo Info; + Info.Name = Names.back(); + Info.FilePath = Header; + for (auto IdentiferContext = Names.rbegin() + 1;

Re: [PATCH] D19869: Added XrefsDBManager into include-fixer and made XrefsDB return SymbolInfo.

2016-05-03 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 56026. ioeric marked an inline comment as done. ioeric added a comment. - Addressed reviewer comment. http://reviews.llvm.org/D19869 Files: include-fixer/CMakeLists.txt include-fixer/InMemoryXrefsDB.cpp include-fixer/InMemoryXrefsDB.h

[PATCH] D19804: Make clang-format cleaner remove redundant commas/colons in constructor initializer list.

2016-05-02 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. Make clang-format cleaner remove redundant commas/colons in constructor initializer list. http://reviews.llvm.org/D19804 Files:

r267858 - Addressed review's comments.

2016-04-28 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Apr 28 02:51:47 2016 New Revision: 267858 URL: http://llvm.org/viewvc/llvm-project?rev=267858=rev Log: Addressed review's comments. Modified: cfe/trunk/lib/Format/AffectedRangeManager.h cfe/trunk/lib/Format/Format.cpp Modified:

r267860 - removed redundant '#'

2016-04-28 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Apr 28 02:52:06 2016 New Revision: 267860 URL: http://llvm.org/viewvc/llvm-project?rev=267860=rev Log: removed redundant '#' Modified: cfe/trunk/lib/Format/AffectedRangeManager.h Modified: cfe/trunk/lib/Format/AffectedRangeManager.h URL:

Re: [PATCH] D19587: Addressed reviewer's post-submission comments from http://reviews.llvm.org/D18551.

2016-04-28 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL267859: Addressed reviewer's post-submission comments from http://reviews.llvm. (authored by ioeric). Changed prior to commit: http://reviews.llvm.org/D19587?vs=55382=55383#toc Repository: rL LLVM

r267859 - Addressed reviewer's post-submission comments from http://reviews.llvm.org/D18551.

2016-04-28 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Apr 28 02:52:03 2016 New Revision: 267859 URL: http://llvm.org/viewvc/llvm-project?rev=267859=rev Log: Addressed reviewer's post-submission comments from http://reviews.llvm.org/D18551. Summary: Make SourceManager in Environment, WhitespaceManager, and

Re: [PATCH] D19587: Addressed reviewer's post-submission comments from http://reviews.llvm.org/D18551.

2016-04-28 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 55382. ioeric added a comment. - removed redundant '#' http://reviews.llvm.org/D19587 Files: lib/Format/AffectedRangeManager.h lib/Format/ContinuationIndenter.cpp lib/Format/ContinuationIndenter.h lib/Format/Format.cpp

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-27 Thread Eric Liu via cfe-commits
ioeric marked 6 inline comments as done. Comment at: cfe/trunk/lib/Format/Format.cpp:1355 @@ -1352,2 +1354,3 @@ std::find(ForEachMacros.begin(), ForEachMacros.end(), -FormatTok->Tok.getIdentifierInfo()) != ForEachMacros.end()) { +

[PATCH] D19587: Addressed reviewer's post-submission comments from http://reviews.llvm.org/D18551.

2016-04-27 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. Make SourceManager in Environment, WhitespaceManager, and FormatTokenAnalyzer etc constant members. http://reviews.llvm.org/D19587 Files:

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-25 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 54855. ioeric marked 4 inline comments as done. ioeric added a comment. - Addressed comments. http://reviews.llvm.org/D18551 Files: include/clang/Format/Format.h lib/Format/AffectedRangeManager.cpp lib/Format/AffectedRangeManager.h

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-25 Thread Eric Liu via cfe-commits
@Daniel, sorry that I forgot to have you look at the final version before submitting it... On Mon, Apr 25, 2016 at 5:15 PM Eric Liu wrote: > This revision was automatically updated to reflect the committed changes. > Closed by commit rL267416: Added Fixer implementation and

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-25 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL267416: Added Fixer implementation and fix() interface in clang-format for removing… (authored by ioeric). Changed prior to commit: http://reviews.llvm.org/D18551?vs=54855=54857#toc Repository: rL

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-25 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 54837. ioeric added a comment. - Refactored - added Environment class. http://reviews.llvm.org/D18551 Files: include/clang/Format/Format.h lib/Format/AffectedRangeManager.cpp lib/Format/AffectedRangeManager.h lib/Format/CMakeLists.txt

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-22 Thread Eric Liu via cfe-commits
PING. On Thu, Apr 21, 2016 at 11:48 AM Eric Liu wrote: > ioeric updated this revision to Diff 54476. > ioeric added a comment. > > - Added comments for endsWithInternal(). > > > http://reviews.llvm.org/D18551 > > Files: > include/clang/Format/Format.h >

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-22 Thread Eric Liu via cfe-commits
ioeric added a subscriber: ioeric. ioeric added a comment. PING. http://reviews.llvm.org/D18551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-21 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 54476. ioeric added a comment. - Added comments for endsWithInternal(). http://reviews.llvm.org/D18551 Files: include/clang/Format/Format.h lib/Format/AffectedRangeManager.cpp lib/Format/AffectedRangeManager.h lib/Format/CMakeLists.txt

Re: [PATCH] D19106: Fixed a bug in AnnotatedLine::startsWith when there are comments in the line.

2016-04-19 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL266803: Fixed a bug in AnnotatedLine::startsWith when there are comments in the line. (authored by ioeric). Changed prior to commit: http://reviews.llvm.org/D19106?vs=54240=54242#toc Repository: rL

r266803 - Fixed a bug in AnnotatedLine::startsWith when there are comments in the line.

2016-04-19 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Apr 19 14:25:33 2016 New Revision: 266803 URL: http://llvm.org/viewvc/llvm-project?rev=266803=rev Log: Fixed a bug in AnnotatedLine::startsWith when there are comments in the line. Summary: When there are comments in the line, one token may be checked multiple times.

Re: [PATCH] D19106: Fixed a bug in AnnotatedLine::startsWith when there are comments in the line.

2016-04-19 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 54240. ioeric marked an inline comment as done. ioeric added a comment. - nit fixed http://reviews.llvm.org/D19106 Files: lib/Format/TokenAnnotator.h Index: lib/Format/TokenAnnotator.h ===

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-19 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 54233. ioeric marked 6 inline comments as done. ioeric added a comment. - Rebased - Make Formatter and Cleaner inherit from TokenAnalyzer (new name for CodeProcessor). http://reviews.llvm.org/D18551 Files: include/clang/Format/Format.h

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-15 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 53866. ioeric marked 6 inline comments as done. ioeric added a comment. - Do not merge multiple lines when generate fixes. Added test cases with comments around namespace. - Refactor: pull Annotator into Formatter/Cleaner from CodeProcessor. Moved

Re: [PATCH] D19106: Fixed a bug in AnnotatedLine::startsWith when there are comments in the line.

2016-04-14 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 53691. ioeric added a comment. - Addressed reviewer comment. http://reviews.llvm.org/D19106 Files: lib/Format/TokenAnnotator.h Index: lib/Format/TokenAnnotator.h === ---

[PATCH] D19106: Fixed a bug in AnnotatedLine::startsWith when there are comments in the line.

2016-04-14 Thread Eric Liu via cfe-commits
ioeric created this revision. ioeric added reviewers: djasper, mprobst. ioeric added a subscriber: cfe-commits. Herald added a subscriber: klimek. When there are comments in the line, one token may be checked multiple times. http://reviews.llvm.org/D19106 Files: lib/Format/TokenAnnotator.h

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-12 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 53370. ioeric added a comment. - minor changes in checkEmptyNamespace. http://reviews.llvm.org/D18551 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/Format/CMakeLists.txt unittests/Format/CleanupTest.cpp

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-11 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 53274. ioeric added a comment. - removed unused fields in AnnotatedLine. http://reviews.llvm.org/D18551 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/Format/CMakeLists.txt unittests/Format/CleanupTest.cpp

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-11 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: lib/Format/Format.cpp:1597 @@ +1596,3 @@ + SmallVector(Ranges.begin(), Ranges.end())), +UnwrappedLines(1), +Encoding(encoding::detectEncoding(SourceMgr.getBufferData(ID))),

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-11 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 53202. ioeric added a comment. - Fixed a potential bug in checkEmptyNamespace. http://reviews.llvm.org/D18551 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/FormatToken.h lib/Format/TokenAnnotator.h

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-10 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 53185. ioeric marked 10 inline comments as done. ioeric added a comment. - Moved constructor initializer fixer to a separate patch; pull runFixer and runFormat into separate classes, and merge common code in CodeProcessor class.

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-06 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 52832. ioeric marked 4 inline comments as done. ioeric added a comment. - Change implementation of fixer to iterate by lines. TODO: refactor Formatter and Fixer to reduce duplication. http://reviews.llvm.org/D18551 Files: include/clang/Format/Format.h

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-05 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: lib/Format/Format.cpp:1596 @@ +1595,3 @@ + +class Fixer : public UnwrappedLineConsumer { +public: djasper wrote: > I am not sure, this is the right class to pull out. It still has a lot of > overlap with formatter. Maybe

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-05 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 52676. ioeric marked 14 inline comments as done. ioeric added a comment. - Refactored the code to reduce code duplication. Code styling. Moved test cases for Fixer into a new file FixTest.cpp. - Added RangeManager to manage affected ranges. make empty

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-04 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 52547. ioeric added a comment. - Added fix for empty namespace. - Merge multiple continuous token deletions into one big replacement; minor code styling. - refactored code to reduce redundancy. http://reviews.llvm.org/D18551 Files:

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-03-31 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 52199. ioeric added a comment. - Added fixReplacements() that fix and reformat replacements. http://reviews.llvm.org/D18551 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/FormatToken.h unittests/Format/FormatTest.cpp Index:

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-03-31 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: include/clang/Format/Format.h:813 @@ +812,3 @@ +/// Otherwise identical to the reformat() function using a file ID. +tooling::Replacements fix(const FormatStyle , StringRef Code, + ArrayRef Ranges,

Re: r264745 - Added formatAndApplyAllReplacements that works on multiple files in libTooling.

2016-03-29 Thread Eric Liu via cfe-commits
tStyle; > ^ > struct > 1 error generated. > ninja: build stopped: subcommand failed. > > > Looks like you added the "class FormatStyle" in Refactoring.h, looks like > this should be a struct instead. > > Thanks, > Teresa > > On Tue, Mar 29, 2016 at

r264760 - Removed class FormatStyle, which is a struct, forward declaration from Refactoring.h to avoid compilation error.

2016-03-29 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Mar 29 13:17:11 2016 New Revision: 264760 URL: http://llvm.org/viewvc/llvm-project?rev=264760=rev Log: Removed class FormatStyle, which is a struct, forward declaration from Refactoring.h to avoid compilation error. Modified:

r264745 - Added formatAndApplyAllReplacements that works on multiple files in libTooling.

2016-03-29 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Mar 29 11:31:53 2016 New Revision: 264745 URL: http://llvm.org/viewvc/llvm-project?rev=264745=rev Log: Added formatAndApplyAllReplacements that works on multiple files in libTooling. Summary: formatAndApplyAllReplacements takes a set of Replacements, applies them on a

Re: [PATCH] D17852: Added formatAndApplyAllReplacements that works on multiple files in libTooling.

2016-03-29 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL264745: Added formatAndApplyAllReplacements that works on multiple files in libTooling. (authored by ioeric). Changed prior to commit: http://reviews.llvm.org/D17852?vs=51936=51939#toc Repository:

Re: [PATCH] D17852: Added formatAndApplyAllReplacements that works on multiple files in libTooling.

2016-03-29 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 51936. ioeric added a comment. - Minor changes. http://reviews.llvm.org/D17852 Files: include/clang/Basic/SourceManager.h include/clang/Format/Format.h include/clang/Tooling/Core/Replacement.h include/clang/Tooling/Refactoring.h

Re: [PATCH] D17852: Added formatAndApplyAllReplacements that works on multiple files in libTooling.

2016-03-29 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 51933. ioeric added a comment. - Change the Style parameter of formatAndApplyReplacements from FormatStyle to be a Style name string. http://reviews.llvm.org/D17852 Files: include/clang/Basic/SourceManager.h include/clang/Format/Format.h

Re: [PATCH] D17852: Added formatAndApplyAllReplacements that works on multiple files in libTooling.

2016-03-29 Thread Eric Liu via cfe-commits
ioeric marked an inline comment as done. Comment at: include/clang/Tooling/Refactoring.h:91 @@ +90,3 @@ + Rewriter , + const format::FormatStyle ); + djasper wrote: > Do you have a use case where

[PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-03-29 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. After applying replacements, redundant code like extra commas or empty namespaces might be introduced. Fixer can detect and remove any redundant code

r264289 - Dsiable FormatStyle::GetStyleOfFile test case for mingw.

2016-03-24 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Mar 24 09:59:39 2016 New Revision: 264289 URL: http://llvm.org/viewvc/llvm-project?rev=264289=rev Log: Dsiable FormatStyle::GetStyleOfFile test case for mingw. Modified: cfe/trunk/unittests/Format/FormatTest.cpp Modified: cfe/trunk/unittests/Format/FormatTest.cpp

Re: r264277 - Added support for different VFSs in format::getStyle. Disable platform-related test case for MS compilers to avoid breaking buildbot.

2016-03-24 Thread Eric Liu via cfe-commits
I am looking into it now. On Thu, Mar 24, 2016 at 2:39 PM Nico Weber <tha...@chromium.org> wrote: > Won't this still be broken in mingw (GCC, but on Windows)? > On Mar 24, 2016 9:28 AM, "Eric Liu via cfe-commits" < > cfe-commits@lists.llvm.org> wrote: > >>

r264275 - Revert "removed redundant comment in format::getStyle."

2016-03-24 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Mar 24 08:22:28 2016 New Revision: 264275 URL: http://llvm.org/viewvc/llvm-project?rev=264275=rev Log: Revert "removed redundant comment in format::getStyle." This reverts commit r264254. Modified: cfe/trunk/lib/Format/Format.cpp Modified:

r264277 - Added support for different VFSs in format::getStyle. Disable platform-related test case for MS compilers to avoid breaking buildbot.

2016-03-24 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Mar 24 08:22:42 2016 New Revision: 264277 URL: http://llvm.org/viewvc/llvm-project?rev=264277=rev Log: Added support for different VFSs in format::getStyle. Disable platform-related test case for MS compilers to avoid breaking buildbot. Modified:

r264276 - Revert "Added support for different VFSs in format::getStyle."

2016-03-24 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Mar 24 08:22:37 2016 New Revision: 264276 URL: http://llvm.org/viewvc/llvm-project?rev=264276=rev Log: Revert "Added support for different VFSs in format::getStyle." This reverts commit r264253. It is breaking the buildbot

r264257 - Revert "Added support for different VFSs in format::getStyle."

2016-03-24 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Mar 24 06:25:28 2016 New Revision: 264257 URL: http://llvm.org/viewvc/llvm-project?rev=264257=rev Log: Revert "Added support for different VFSs in format::getStyle." This reverts commit r264253. It is breaking the buildbot

<    4   5   6   7   8   9   10   >