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 56139. ioeric marked 7 inline comments as done. 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/find-all-symb

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 include-fixer/find-all-symbols

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 unittests

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 unittests/include

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 56148. ioeric added a comment. - Removed SetCommonInfo declaration from header. http://reviews.llvm.org/D19913 Files: include-fixer/InMemoryXrefsDB.cpp include-fixer/find-all-symbols/SymbolInfo.cpp include-fixer/find-all-symbols/SymbolInfo.h unittest

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 &Name, const std::string &FilePath, + const std::vector &Contexts, int LineNumb

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 b

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: lib/Format/Format

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 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 (a

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 int

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 cont

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: > > > You

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 =

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

2016-05-17 Thread Eric Liu via cfe-commits
ioeric created this revision. ioeric added reviewers: bkramer, hokein. ioeric added a subscriber: cfe-commits. [clang-include-fixer] Added Vim integration for clang-include-fixer. http://reviews.llvm.org/D20329 Files: include-fixer/tool/ClangIncludeFixer.cpp include-fixer/tool/clang-include-

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] 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 spec

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&view=rev Log: Make clang-format cleaner remove redundant commas in list and redundant colon in constructor initializer. Summary: Make clang-format cleaner remove redundant comma

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&id=57570#toc Repository:

r269889 - [clang-format] Make FormatTokenLess::operator() const.

2016-05-18 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed May 18 03:14:49 2016 New Revision: 269889 URL: http://llvm.org/viewvc/llvm-project?rev=269889&view=rev Log: [clang-format] Make FormatTokenLess::operator() const. Modified: cfe/trunk/lib/Format/Format.cpp Modified: cfe/trunk/lib/Format/Format.cpp URL: http://llvm.or

[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 unittests/Format/Format

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&view=rev Log: [clang-format] Make formatReplacements() also sort #includes. Summary: [clang-format] Make formatReplacements() also sort #includes. Reviewers: bkramer, djasper S

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&id=57612#toc Repository: rL LLVM http://r

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: include-fixe

[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&view=rev Log: [clang-include-fixer] Added Vim integration for clang-include-fixer. Summary: [clang-include-fixer] Added Vim integration for clang-include-fixer. Reviewers: hokei

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&id=57618#toc Repository: rL LLVM h

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

[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&view=rev Log: [include-fixer] Sort headers after inserting new headers. Summary: [include-fixer] Sort headers after inserting new headers. Reviewers: bkramer Subscribers: klime

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&id=57746#toc Repository: rL LLVM http://revie

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. nit:

[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&view=rev Log: [find-all-symbols] make HeaderMapCollector optional in FindAllSymbols and FindAllMacros. Modified: clang-tools-extra/trunk/include-fixer/find-all-symbols/FindA

[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&view=rev Log: [find-all-symbols] fixed FindAllMacros compilation error. Modified: clang-tools-extra/trunk/include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp Modifie

[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&view=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: cl

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 &Rewrite, + const format::FormatStyle &Style); + djasper wrote: > Do you have a u

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 include/clang

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 lib/Format/Format.c

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&id=51939#toc Repository:

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&view=rev Log: Added formatAndApplyAllReplacements that works on multiple files in libTooling. Summary: formatAndApplyAllReplacements takes a set of Replacements, applies them on

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&view=rev Log: Removed class FormatStyle, which is a struct, forward declaration from Refactoring.h to avoid compilation error. Modified: cfe/trunk/include/clang/Tooling/Refa

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

2016-03-29 Thread Eric Liu via cfe-commits
; ^ > 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 9:31 AM,

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 &Style, StringRef Code, + ArrayRef Ranges, --

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: un

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: include/clang/Format/Fo

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 namespac

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-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 l

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. http://reviews.llvm.org/D1855

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 unittests/Format/CMakeList

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))), djasper wrote: >

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 53268. ioeric marked 16 inline comments as done. ioeric added a comment. - Addressed comments. http://reviews.llvm.org/D18551 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/TokenAnnotator.h unittests/Format/CMakeLists.txt uni

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 unittests/Format/For

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 unittests/Format/Forma

[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 In

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 === --- lib/Format/TokenAnnot

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 AffectedRan

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 lib/Format/Affect

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
PING. On Thu, Apr 14, 2016 at 1:52 PM Eric Liu wrote: > 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 > ===

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 === --

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&view=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
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&id=54242#toc Repository: r

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 lib/Format/F

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-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 > lib/Format/AffectedRangeManager.cpp >

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 lib/Format/Fo

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 54848. ioeric added a comment. - Merged VirtualEnvironment into Environment. http://reviews.llvm.org/D18551 Files: include/clang/Format/Format.h lib/Format/AffectedRangeManager.cpp lib/Format/AffectedRangeManager.h lib/Format/CMakeLists.txt lib/For

r267416 - Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-25 Thread Eric Liu via cfe-commits
Author: ioeric Date: Mon Apr 25 10:09:22 2016 New Revision: 267416 URL: http://llvm.org/viewvc/llvm-project?rev=267416&view=rev Log: Added Fixer implementation and fix() interface in clang-format for removing redundant code. Summary: After applying replacements, redundant code like extra commas

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&id=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
@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 fix() interface > in

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 lib/Format/CMakeLi

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 added a comment. @Daniel, sorry that I forgot to have you look at the final version before submitting it... Repository: rL LLVM http://reviews.llvm.org/D18551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

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 inclu

[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: include-fixer/find-all-symbols/CMake

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 include-fixer/find-all

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 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 include-fixer/f

[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&view=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
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&id=58237#toc Repository: rL LLV

[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&view=rev Log: [include-fixer][find-all-symbols] removed unused const member from YamlReporter to fix build bot failure. Modified: clang-tools-extra/trunk/include-fixer/find

[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&view=rev Log: [include-fixer][find-all-symbols] added missing dependencies. Modified: clang-tools-extra/trunk/include-fixer/find-all-symbols/CMakeLists.txt Modified: clang-t

[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&view=rev Log: [include-fixer] moved STLPostfixMap into findAllSymbols library and make it a static variable in function. Summary: [include-fixer] moved STLPostfixMap into findAl

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&id=58410#toc Repository:

[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&view=rev Log: [include-fixer] /usr/include/xlocal.h to include/xlocal.h in hardcoded map. Modified: clang-tools-extra/trunk/include-fixer/find-all-symbols/STLPostfixHeaderMa

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 &SourceManager, - clang::HeaderSearch &HeaderSearch, - st

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 &SourceManager, + clang::HeaderSearch &HeaderSearch) { I think function na

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&view=rev Log: [clang-format] moved unit tests related to replacements cleaner from FormatTest.cpp to CleanUpTest.cpp. Modified: cfe/trunk/unittests/Format/CleanupTest.cpp

[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 #

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

2016-05-30 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 58952. ioeric marked 9 inline comments as done. ioeric added a comment. - Addressed reviewer's comments. http://reviews.llvm.org/D20734 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: unittests/Format

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

2016-05-30 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: lib/Format/Format.cpp:1551 @@ +1550,3 @@ +return Replaces; + tooling::Replacements HeaderInsertionReplaces; + tooling::Replacements NewReplaces; djasper wrote: > Why do you split out all the header insertion replacem

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

2016-05-30 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: include-fixer/IncludeFixer.h:80 @@ +79,3 @@ +unsigned FirstIncludeOffset=-1U, +const clang::format::FormatStyle &Style=clang::format::getLLVMStyle()); + I don't see why we'd want Style to be optional.

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

2016-05-30 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 58982. ioeric marked 16 inline comments as done. ioeric added a comment. - Addressed reviewers' comments. http://reviews.llvm.org/D20734 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: unittests/Forma

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

2016-05-30 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: lib/Format/Format.cpp:1550 @@ +1549,3 @@ +// Insert #include directives into the correct blocks. +tooling::Replacements fixHeaderInsertions(StringRef Code, + const tooling::Replacements &Replaces,

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

2016-05-30 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: lib/Format/Format.cpp:1550 @@ +1549,3 @@ + HeaderInsertionReplaces = + fixCppIncludeInsertions(Code, HeaderInsertionReplaces, Style); + NewReplaces.insert(HeaderInsertionReplaces.begin(), djasper wrote: > So, not kn

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

2016-05-30 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 58992. ioeric marked 3 inline comments as done. ioeric added a comment. - Addressed reviewer's comments. http://reviews.llvm.org/D20734 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: unittests/Format

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

2016-05-30 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 58993. ioeric added a comment. - Removed inline from isHeaderInsertion. http://reviews.llvm.org/D20734 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: unittests/Format/CleanupTest.cpp

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

2016-05-31 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 59017. ioeric added a comment. - Use std::set_difference in fixCppIncludeInsertions() http://reviews.llvm.org/D20734 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: unittests/Format/CleanupTest.cpp ==

[PATCH] D20804: [include-fixer] collect the number of times a symbols is found in an indexing run and use it for symbols popularity ranking.

2016-05-31 Thread Eric Liu via cfe-commits
ioeric created this revision. ioeric added a reviewer: bkramer. ioeric added subscribers: djasper, hokein, cfe-commits. [include-fixer] collect the number of times a symbols is found in an indexing run and use it for symbols popularity ranking. http://reviews.llvm.org/D20804 Files: include-fix

Re: [PATCH] D20804: [include-fixer] collect the number of times a symbols is found in an indexing run and use it for symbols popularity ranking.

2016-05-31 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 59027. ioeric added a comment. - Removed a redundant set of symbols during merging. http://reviews.llvm.org/D20804 Files: include-fixer/find-all-symbols/SymbolInfo.cpp include-fixer/find-all-symbols/SymbolInfo.h include-fixer/find-all-symbols/tool/Find

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

2016-05-31 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: unittests/Format/CleanupTest.cpp:310 @@ +309,3 @@ + + Context.createInMemoryFile("fix.cpp", Code); + tooling::Replacements Replaces; djasper wrote: > I'd pull out a lot of these environment setup things into abstractions

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

2016-05-31 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 59035. ioeric marked 7 inline comments as done. ioeric added a comment. - Addressed commments. http://reviews.llvm.org/D20734 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: unittests/Format/CleanupTe

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

2016-05-31 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: unittests/Format/CleanupTest.cpp:310 @@ +309,3 @@ + Context.createInMemoryFile("fix.cpp", Code); + tooling::Replacements Replaces = { + tooling::Replacement("fix.cpp", UINT_MAX, 0, "#include \"b.h\"")}; djasper wrot

<    3   4   5   6   7   8   9   10   >