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
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
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
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 ,
-
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:
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
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
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:
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:
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
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
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
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
___
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
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:
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
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:
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:
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:
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.
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
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,
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
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
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,
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:
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
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
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
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
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
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
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
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
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:
> > >
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
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
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
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
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:
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
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,
+
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
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
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
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,
+
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
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
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.
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
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
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;
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
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:
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:
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:
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
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
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
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()) {
+
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:
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
@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
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
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
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
>
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
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
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
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.
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
===
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
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
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
===
---
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
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
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
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))),
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
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.
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
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
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
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:
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:
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,
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
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:
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
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:
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
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
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
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
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
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:
>
>>
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:
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:
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
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
801 - 900 of 937 matches
Mail list logo