ioeric updated this revision to Diff 59043.
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
This revision was automatically updated to reflect the committed changes.
Closed by commit rL271268: [include-fixer] collect the number of times a
symbols is found in an indexing… (authored by ioeric).
Changed prior to commit:
http://reviews.llvm.org/D20804?vs=59027&id=59045#toc
Repository:
Author: ioeric
Date: Tue May 31 07:01:48 2016
New Revision: 271268
URL: http://llvm.org/viewvc/llvm-project?rev=271268&view=rev
Log:
[include-fixer] collect the number of times a symbols is found in an indexing
run and use it for symbols popularity ranking.
Summary:
[include-fixer] collect the n
ioeric updated this revision to Diff 59053.
ioeric marked 3 inline comments as done.
ioeric added a comment.
- Nits fixed.
http://reviews.llvm.org/D20734
Files:
include/clang/Format/Format.h
lib/Format/Format.cpp
unittests/Format/CleanupTest.cpp
Index: unittests/Format/CleanupTest.cpp
==
This revision was automatically updated to reflect the committed changes.
Closed by commit rL271276: [clang-format] insert new #includes into correct
blocks when cleaning up… (authored by ioeric).
Changed prior to commit:
http://reviews.llvm.org/D20734?vs=59053&id=59056#toc
Repository:
rL LL
Author: ioeric
Date: Tue May 31 08:34:20 2016
New Revision: 271276
URL: http://llvm.org/viewvc/llvm-project?rev=271276&view=rev
Log:
[clang-format] insert new #includes into correct blocks when cleaning up
Replacement with cleanupAroundReplacements().
Summary:
When a replacement's offset is set
Author: ioeric
Date: Tue May 31 08:52:59 2016
New Revision: 271279
URL: http://llvm.org/viewvc/llvm-project?rev=271279&view=rev
Log:
[include-fixer] use tooling::Replacements since the order of replacements don't
matter anymore.
Summary: [include-fixer] use tooling::Replacements since the order
This revision was automatically updated to reflect the committed changes.
Closed by commit rL271279: [include-fixer] use tooling::Replacements since the
order of replacements… (authored by ioeric).
Changed prior to commit:
http://reviews.llvm.org/D20813?vs=59060&id=59061#toc
Repository:
rL L
Author: ioeric
Date: Tue May 31 09:48:45 2016
New Revision: 271287
URL: http://llvm.org/viewvc/llvm-project?rev=271287&view=rev
Log:
[include-fixer] use clang-format cleaner to insert header.
Summary: clang-format's cleanupAroundReplacements() takes care of header
insertions.
Reviewers: bkramer
This revision was automatically updated to reflect the committed changes.
Closed by commit rL271287: [include-fixer] use clang-format cleaner to insert
header. (authored by ioeric).
Changed prior to commit:
http://reviews.llvm.org/D20816?vs=59067&id=59069#toc
Repository:
rL LLVM
http://revi
Author: ioeric
Date: Tue May 31 11:03:09 2016
New Revision: 271294
URL: http://llvm.org/viewvc/llvm-project?rev=271294&view=rev
Log:
[include-fixer] removed unused forward declaration.
Modified:
clang-tools-extra/trunk/include-fixer/IncludeFixer.cpp
Modified: clang-tools-extra/trunk/include-
Thanks for the patch!
On Tue, May 31, 2016 at 6:48 PM NAKAMURA Takumi via cfe-commits <
cfe-commits@lists.llvm.org> wrote:
> Author: chapuni
> Date: Tue May 31 11:41:39 2016
> New Revision: 271295
>
> URL: http://llvm.org/viewvc/llvm-project?rev=271295&view=rev
> Log:
> IncludeFixerTests: Update
Author: ioeric
Date: Tue May 31 12:37:38 2016
New Revision: 271302
URL: http://llvm.org/viewvc/llvm-project?rev=271302&view=rev
Log:
[find-all-symbols] remove dots in SymbolInfo file paths.
Summary: remove dots in SymbolInfo file paths.
Reviewers: bkramer, klimek
Subscribers: cfe-commits
Diffe
This revision was automatically updated to reflect the committed changes.
Closed by commit rL271302: [find-all-symbols] remove dots in SymbolInfo file
paths. (authored by ioeric).
Changed prior to commit:
http://reviews.llvm.org/D20819?vs=59075&id=59091#toc
Repository:
rL LLVM
http://review
Author: ioeric
Date: Tue May 31 14:22:01 2016
New Revision: 271321
URL: http://llvm.org/viewvc/llvm-project?rev=271321&view=rev
Log:
[include-fixer] disable path cleaning test for windows and mingw.
Modified:
clang-tools-extra/trunk/unittests/include-fixer/find-all-symbols/FindAllSymbolsTest
ioeric created this revision.
ioeric added a reviewer: djasper.
ioeric added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
don't just identify first #define as header guard anymore. Use #ifndef
#define to tell if a #define belongs to header guard.
http://reviews.llvm.org/D20858
F
ioeric updated this revision to Diff 59200.
ioeric added a comment.
- Addressed reviewer's comments.
http://reviews.llvm.org/D20855
Files:
include-fixer/find-all-symbols/CMakeLists.txt
include-fixer/find-all-symbols/FindAllMacros.cpp
include-fixer/find-all-symbols/FindAllSymbols.cpp
inc
This revision was automatically updated to reflect the committed changes.
Closed by commit rL271385: [include-fixer] use includer of .inc header to be
the file path of a symbol… (authored by ioeric).
Changed prior to commit:
http://reviews.llvm.org/D20855?vs=59200&id=59202#toc
Repository:
rL
Author: ioeric
Date: Wed Jun 1 07:01:06 2016
New Revision: 271385
URL: http://llvm.org/viewvc/llvm-project?rev=271385&view=rev
Log:
[include-fixer] use includer of .inc header to be the file path of a symbol
from .inc header.
Summary: added PathConfig.cpp and use includer of .inc header to be t
ioeric updated this revision to Diff 59206.
ioeric added a comment.
- Use iterator looping to simplify code.
http://reviews.llvm.org/D20858
Files:
lib/Format/Format.cpp
unittests/Format/CleanupTest.cpp
Index: unittests/Format/CleanupTest.cpp
ioeric added inline comments.
Comment at: lib/Format/Format.cpp:1472
@@ -1471,2 +1471,3 @@
llvm::Regex IncludeRegex(IncludeRegexPattern);
- llvm::Regex DefineRegex(R"(^[\t\ ]*#[\t\ ]*define[\t\ ]*[^\\]*$)");
+ llvm::Regex IfNDefRegex(R"(^[\t\ ]*#[\t\ ]*ifndef[\t\ ]*([^\\]*)$)
ioeric created this revision.
ioeric added reviewers: bkramer, klimek.
ioeric added subscribers: hokein, cfe-commits.
[include-fixer] added GNU symbols hardcoded header mapping.
http://reviews.llvm.org/D20902
Files:
include-fixer/find-all-symbols/STLPostfixHeaderMap.cpp
Index: include-fixer/f
ioeric added a subscriber: ioeric.
ioeric added a comment.
ping
http://reviews.llvm.org/D20898
___
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 59411.
ioeric added a comment.
- Addressed reviewer's comment.
http://reviews.llvm.org/D20902
Files:
include-fixer/find-all-symbols/STLPostfixHeaderMap.cpp
Index: include-fixer/find-all-symbols/STLPostfixHeaderMap.cpp
=
ioeric updated this revision to Diff 59497.
ioeric added a comment.
- Use FormatTokenLexer to skip comments.
http://reviews.llvm.org/D20898
Files:
lib/Format/Format.cpp
unittests/Format/CleanupTest.cpp
Index: unittests/Format/CleanupTest.cpp
ioeric updated this revision to Diff 59499.
ioeric added a comment.
- Removed non glibc header mapping.
http://reviews.llvm.org/D20902
Files:
include-fixer/find-all-symbols/STLPostfixHeaderMap.cpp
Index: include-fixer/find-all-symbols/STLPostfixHeaderMap.cpp
=
ioeric updated this revision to Diff 59508.
ioeric added a comment.
- Use regular Lexer instead of FormatTokenLexer.
http://reviews.llvm.org/D20898
Files:
lib/Format/Format.cpp
unittests/Format/CleanupTest.cpp
Index: unittests/Format/CleanupTest.cpp
ioeric updated this revision to Diff 59510.
ioeric marked an inline comment as done.
ioeric added a comment.
- Switch back to range-base looping for Lines.
http://reviews.llvm.org/D20898
Files:
lib/Format/Format.cpp
unittests/Format/CleanupTest.cpp
Index: unittests/Format/CleanupTest.cpp
=
ioeric updated this revision to Diff 59511.
ioeric added a comment.
- Nits fixed.
http://reviews.llvm.org/D20898
Files:
lib/Format/Format.cpp
unittests/Format/CleanupTest.cpp
Index: unittests/Format/CleanupTest.cpp
===
--- uni
Author: ioeric
Date: Fri Jun 3 04:25:03 2016
New Revision: 271637
URL: http://llvm.org/viewvc/llvm-project?rev=271637&view=rev
Log:
[include-fixer] added GNU symbols hardcoded header mapping.
Summary: [include-fixer] added GNU symbols hardcoded header mapping.
Reviewers: klimek, bkramer
Subscr
This revision was automatically updated to reflect the committed changes.
Closed by commit rL271637: [include-fixer] added GNU symbols hardcoded header
mapping. (authored by ioeric).
Changed prior to commit:
http://reviews.llvm.org/D20902?vs=59499&id=59513#toc
Repository:
rL LLVM
http://rev
Author: ioeric
Date: Fri Jun 3 04:33:22 2016
New Revision: 271638
URL: http://llvm.org/viewvc/llvm-project?rev=271638&view=rev
Log:
[include-fixer] fixed a wrong header mapping.
Modified:
clang-tools-extra/trunk/include-fixer/find-all-symbols/STLPostfixHeaderMap.cpp
Modified:
clang-tools-
Author: ioeric
Date: Fri Jun 3 07:52:59 2016
New Revision: 271664
URL: http://llvm.org/viewvc/llvm-project?rev=271664&view=rev
Log:
[clang-format] skip empty lines and comments in the top of the code when
inserting new headers.
Summary:
[clang-format] skip empty lines and comments in the top of
This revision was automatically updated to reflect the committed changes.
Closed by commit rL271664: [clang-format] skip empty lines and comments in the
top of the code when… (authored by ioeric).
Changed prior to commit:
http://reviews.llvm.org/D20898?vs=59511&id=59538#toc
Repository:
rL LL
ioeric abandoned this revision.
ioeric added a comment.
Abandon this patch in favor of http://reviews.llvm.org/D20959
http://reviews.llvm.org/D20858
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listin
ioeric created this revision.
ioeric added a reviewer: djasper.
ioeric added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
make header guard identification stricter with Lexer.
http://reviews.llvm.org/D20959
Files:
lib/Format/Format.cpp
unittests/Format/CleanupTest.cpp
Index
ioeric updated this revision to Diff 59549.
ioeric marked 3 inline comments as done.
ioeric added a comment.
- Addressed reviewer's comments.
http://reviews.llvm.org/D20959
Files:
lib/Format/Format.cpp
unittests/Format/CleanupTest.cpp
Index: unittests/Format/CleanupTest.cpp
===
ioeric accepted this revision.
ioeric added a comment.
This revision is now accepted and ready to land.
LG.
http://reviews.llvm.org/D20960
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
ioeric added a comment.
Friendly PING
http://reviews.llvm.org/D20959
___
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 59698.
ioeric marked 2 inline comments as done.
ioeric added a comment.
- Addressed reviewer's comments. Added a test case for empty code.
http://reviews.llvm.org/D20959
Files:
lib/Format/Format.cpp
unittests/Format/CleanupTest.cpp
Index: unittests/Form
ioeric added inline comments.
Comment at: lib/Format/Format.cpp:1500
@@ +1499,3 @@
+ // Get the first token.
+ Lex.LexFromRawLexer(Tok);
+ skipComments(Lex, Tok);
djasper wrote:
> Can this go wrong? Maybe in an empty file?
Added a test case for empty file.
If
ioeric added inline comments.
Comment at: lib/Format/Format.cpp:1474
@@ +1473,3 @@
+ if (checkAndConsumeDirectiveWithName(Lex, "ifndef", Tok)) {
+skipComments(Lex, Tok);
+if (checkAndConsumeDirectiveWithName(Lex, "define", Tok))
djasper wrote:
> I wonder
ioeric updated this revision to Diff 59700.
ioeric marked 6 inline comments as done.
ioeric added a comment.
- Addressed reviewer's comments.
http://reviews.llvm.org/D20959
Files:
lib/Format/Format.cpp
unittests/Format/CleanupTest.cpp
Index: unittests/Format/CleanupTest.cpp
===
Author: ioeric
Date: Mon Jun 6 06:00:13 2016
New Revision: 271883
URL: http://llvm.org/viewvc/llvm-project?rev=271883&view=rev
Log:
[clang-format] make header guard identification stricter (with Lexer).
Summary: make header guard identification stricter with Lexer.
Reviewers: djasper
Subscribe
This revision was automatically updated to reflect the committed changes.
Closed by commit rL271883: [clang-format] make header guard identification
stricter (with Lexer). (authored by ioeric).
Changed prior to commit:
http://reviews.llvm.org/D20959?vs=59700&id=59703#toc
Repository:
rL LLVM
ioeric created this revision.
ioeric added reviewers: bkramer, hokein.
ioeric added a subscriber: cfe-commits.
use 'input()' to get user's input so that we can support more options.
http://reviews.llvm.org/D21019
Files:
include-fixer/tool/clang-include-fixer.py
Index: include-fixer/tool/clang
ioeric updated this revision to Diff 59722.
ioeric marked 2 inline comments as done.
ioeric added a comment.
- Addressed reviewer's comments.
http://reviews.llvm.org/D21019
Files:
include-fixer/tool/clang-include-fixer.py
Index: include-fixer/tool/clang-include-fixer.py
=
ioeric created this revision.
ioeric added a reviewer: djasper.
ioeric added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
append newline after code when inserting new headers at the end of the
code which does not end with newline.
http://reviews.llvm.org/D21026
Files:
lib/Form
ioeric updated this revision to Diff 59858.
ioeric added a comment.
- fixed a bug with index.
http://reviews.llvm.org/D21019
Files:
include-fixer/tool/clang-include-fixer.py
Index: include-fixer/tool/clang-include-fixer.py
===
-
ioeric added a comment.
As per our offline discussion, `getchar()` does not work with options with more
than 2 digits (e.g. index number > 9). I'll keep it as it is now until we come
up with a better solution.
http://reviews.llvm.org/D21019
___
cf
Author: ioeric
Date: Tue Jun 7 07:21:43 2016
New Revision: 272004
URL: http://llvm.org/viewvc/llvm-project?rev=272004&view=rev
Log:
[include-fixer] try to make vim header selection more friendly.
Summary: use 'input()' to get user's input so that we can support more options.
Reviewers: hokein,
This revision was automatically updated to reflect the committed changes.
Closed by commit rL272004: [include-fixer] try to make vim header selection
more friendly. (authored by ioeric).
Changed prior to commit:
http://reviews.llvm.org/D21019?vs=59858&id=59871#toc
Repository:
rL LLVM
http:/
Author: ioeric
Date: Wed Jun 8 07:13:14 2016
New Revision: 272132
URL: http://llvm.org/viewvc/llvm-project?rev=272132&view=rev
Log:
[include-fixer] do not add enum forward declaration into symbol index table.
Modified:
clang-tools-extra/trunk/include-fixer/find-all-symbols/FindAllSymbols.cpp
Author: ioeric
Date: Wed Jun 8 09:57:43 2016
New Revision: 272151
URL: http://llvm.org/viewvc/llvm-project?rev=272151&view=rev
Log:
[include-fixer] explicitly set minimize-paths in test.
Modified:
clang-tools-extra/trunk/test/include-fixer/include_path.cpp
Modified: clang-tools-extra/trunk/
ioeric created this revision.
ioeric added a reviewer: bkramer.
ioeric added a subscriber: cfe-commits.
we want to exclude friend declaration, but the `DeclContext` of a
friend function declaration is not the class in which it is declared, so we need
to explicitly check if the parent is a `friendD
ioeric created this revision.
ioeric added a reviewer: bkramer.
ioeric added a subscriber: cfe-commits.
give users an option to show N more headers in case there are too many
candidates.
http://reviews.llvm.org/D21181
Files:
include-fixer/tool/clang-include-fixer.py
Index: include-fixer/tool
This revision was automatically updated to reflect the committed changes.
Closed by commit rL272261: [include-fixer] do not index friend function
declaration. (authored by ioeric).
Changed prior to commit:
http://reviews.llvm.org/D21175?vs=60147&id=60168#toc
Repository:
rL LLVM
http://revie
Author: ioeric
Date: Thu Jun 9 09:18:40 2016
New Revision: 272261
URL: http://llvm.org/viewvc/llvm-project?rev=272261&view=rev
Log:
[include-fixer] do not index friend function declaration.
Summary:
we want to exclude friend declaration, but the `DeclContext` of a
friend function declaration is
ioeric updated this revision to Diff 60338.
ioeric added a comment.
- remove option (a) in favor of option (m); show a new prompt on invalid option
instead of aborting.
http://reviews.llvm.org/D21181
Files:
include-fixer/tool/clang-include-fixer.py
Index: include-fixer/tool/clang-include-fi
Author: ioeric
Date: Fri Jun 10 07:09:33 2016
New Revision: 272387
URL: http://llvm.org/viewvc/llvm-project?rev=272387&view=rev
Log:
[include-fixer] give users an option to show N more headers in case there are
too many candidates.
Summary: give users an option to show N more headers in case the
This revision was automatically updated to reflect the committed changes.
Closed by commit rL272387: [include-fixer] give users an option to show N more
headers in case there are… (authored by ioeric).
Changed prior to commit:
http://reviews.llvm.org/D21181?vs=60338&id=60342#toc
Repository:
Author: ioeric
Date: Sat Jun 11 06:45:08 2016
New Revision: 272465
URL: http://llvm.org/viewvc/llvm-project?rev=272465&view=rev
Log:
[clang-format] pass Style by reference instead of value.
Modified:
cfe/trunk/lib/Format/Format.cpp
Modified: cfe/trunk/lib/Format/Format.cpp
URL:
http://llvm.
Hi Mehdi,
No, it is not intended... thanks for pointing that out! I have fixed it at
rL272465.
Thanks,
Eric
On Fri, Jun 10, 2016 at 10:42 PM Mehdi Amini wrote:
> Hi Eric,
>
> > On Jun 6, 2016, at 4:00 AM, Eric Liu via cfe-commits <
> cfe-commits@lists.llvm.org> wrote:
&
ioeric created this revision.
ioeric added a reviewer: bkramer.
ioeric added a subscriber: cfe-commits.
we should only deduplicate symbols after matching symbols with the
undefined identifier. This patch tries to fix the situation where matching
symbols are deleted when it has the same header as a
This revision was automatically updated to reflect the committed changes.
Closed by commit rL272576: [include-fixer] only deduplicate symbols after
matching symbols with the… (authored by ioeric).
Changed prior to commit:
http://reviews.llvm.org/D21290?vs=60525&id=60575#toc
Repository:
rL LL
Author: ioeric
Date: Mon Jun 13 14:05:07 2016
New Revision: 272576
URL: http://llvm.org/viewvc/llvm-project?rev=272576&view=rev
Log:
[include-fixer] only deduplicate symbols after matching symbols with the
undefined identifier.
Summary:
we should only deduplicate symbols after matching symbols w
Author: ioeric
Date: Tue Jun 14 07:14:36 2016
New Revision: 272657
URL: http://llvm.org/viewvc/llvm-project?rev=272657&view=rev
Log:
[include-fixer] remove redundant code.
Modified:
clang-tools-extra/trunk/include-fixer/tool/ClangIncludeFixer.cpp
Modified: clang-tools-extra/trunk/include-fix
ioeric created this revision.
ioeric added a reviewer: djasper.
ioeric added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
do not add existing includes.
http://reviews.llvm.org/D21323
Files:
lib/Format/Format.cpp
unittests/Format/CleanupTest.cpp
Index: unittests/Format/Clean
ioeric added a comment.
It should be quite straight-forward to de-duplicate #includes in the same block
in `sortIncludes`. I'm happy to add this into `sortIncludes`, but I'm not sure
if this is a behavior users would expect from clang-format since it deletes
code?
And maybe duplicated headers
ioeric added a comment.
Agreed. So, do we still want to skip existing #includes here or simply rely on
`sortIncludes` to de-duplicate?
http://reviews.llvm.org/D21323
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-
ioeric updated this revision to Diff 60675.
ioeric marked an inline comment as done.
ioeric added a comment.
- Addressed reviewer's comments: test case added.
http://reviews.llvm.org/D21323
Files:
lib/Format/Format.cpp
unittests/Format/CleanupTest.cpp
Index: unittests/Format/CleanupTest.cp
ioeric updated this revision to Diff 60680.
ioeric marked 2 inline comments as done.
ioeric added a comment.
- addressed reviewer's comments.
http://reviews.llvm.org/D21323
Files:
lib/Format/Format.cpp
unittests/Format/CleanupTest.cpp
Index: unittests/Format/CleanupTest.cpp
===
ioeric added inline comments.
Comment at: unittests/Format/CleanupTest.cpp:701
@@ +700,3 @@
+ std::string Code = "#include \"a.h\"\n#include \n";
+ std::string Expected = "#include \"a.h\"\n#include \"vector\"\n"
+ "#include \n#include \n";
--
Author: ioeric
Date: Tue Jun 14 09:09:21 2016
New Revision: 272669
URL: http://llvm.org/viewvc/llvm-project?rev=272669&view=rev
Log:
[clang-format] do not add existing includes.
Summary: do not add existing includes.
Reviewers: djasper
Subscribers: klimek, cfe-commits
Differential Revision: ht
This revision was automatically updated to reflect the committed changes.
Closed by commit rL272669: [clang-format] do not add existing includes.
(authored by ioeric).
Changed prior to commit:
http://reviews.llvm.org/D21323?vs=60680&id=60681#toc
Repository:
rL LLVM
http://reviews.llvm.org/D
ioeric created this revision.
ioeric added reviewers: djasper, klimek.
ioeric added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
Not sure if this is intended, but there are two identical sets of
declarations of applyAllReplacements.
http://reviews.llvm.org/D21375
Files:
includ
ioeric abandoned this revision.
ioeric added a comment.
Abandon this patch in favor of http://reviews.llvm.org/D21382
http://reviews.llvm.org/D21375
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listin
ioeric created this revision.
ioeric added reviewers: djasper, klimek.
ioeric added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
Added calculateRangesAfterReplaments() to calculate original ranges as well as
newly affacted ranges in the new code.
http://reviews.llvm.org/D21547
F
ioeric updated this revision to Diff 61340.
ioeric added a comment.
- fixed commenting.
http://reviews.llvm.org/D21547
Files:
include/clang/Tooling/Core/Replacement.h
lib/Tooling/Core/Replacement.cpp
unittests/Tooling/RefactoringTest.cpp
Index: unittests/Tooling/RefactoringTest.cpp
=
ioeric updated this revision to Diff 61359.
ioeric marked 6 inline comments as done.
ioeric added a comment.
- Use mergeReplacements to calculate the new affected ranges.
http://reviews.llvm.org/D21547
Files:
include/clang/Tooling/Core/Replacement.h
lib/Tooling/Core/Replacement.cpp
unitte
ioeric added inline comments.
Comment at: include/clang/Tooling/Core/Replacement.h:253
@@ +252,3 @@
+std::vector
+calculateRangesAfterReplacements(const Replacements &Replaces,
+ const std::vector &Ranges);
getShiftedRanges sounds l
ioeric updated this revision to Diff 61375.
ioeric marked 5 inline comments as done and an inline comment as not done.
ioeric added a comment.
- Addressed reviewer's comments.
http://reviews.llvm.org/D21547
Files:
include/clang/Tooling/Core/Replacement.h
lib/Tooling/Core/Replacement.cpp
u
ioeric added inline comments.
Comment at: include/clang/Tooling/Core/Replacement.h:69
@@ +68,3 @@
+ /// \brief Whether this range equals to \p RHS or not.
+ bool operator==(const Range &RHS) const {
+return Offset == RHS.getOffset() && Length == RHS.getLength();
ioeric updated this revision to Diff 61405.
ioeric marked 2 inline comments as done.
ioeric added a comment.
- removed redundant return type in lambda function.
http://reviews.llvm.org/D21547
Files:
include/clang/Tooling/Core/Replacement.h
lib/Tooling/Core/Replacement.cpp
unittests/Toolin
ioeric added inline comments.
Comment at: lib/Tooling/Core/Replacement.cpp:285
@@ +284,3 @@
+[](const Range &LHS, const Range &RHS) -> bool {
+ if (LHS.getOffset() != RHS.getOffset())
+return LHS.getOffset() < RHS.getOffset();
-
Author: ioeric
Date: Tue Jun 21 12:56:31 2016
New Revision: 273290
URL: http://llvm.org/viewvc/llvm-project?rev=273290&view=rev
Log:
Added calculateRangesAfterReplaments() to calculate affacted ranges in the new
code.
Summary:
Added calculateRangesAfterReplaments() to calculate original ranges a
This revision was automatically updated to reflect the committed changes.
Closed by commit rL273290: Added calculateRangesAfterReplaments() to calculate
affacted ranges in the… (authored by ioeric).
Changed prior to commit:
http://reviews.llvm.org/D21547?vs=61405&id=61407#toc
Repository:
rL
Author: ioeric
Date: Tue Jun 21 12:59:57 2016
New Revision: 273291
URL: http://llvm.org/viewvc/llvm-project?rev=273291&view=rev
Log:
[clang-apply-replacements] use Range::operator==() instead of self-defined
operator.
Modified:
clang-tools-extra/trunk/unittests/clang-apply-replacements/Refo
f2
> Stack right redzone: f3
> Stack partial redzone: f4
> Stack after return: f5
> Stack use after scope: f8
> Global redzone: f9
> Global init order: f6
> Poisoned by user:f7
> Container overflow: fc
> Array co
Author: ioeric
Date: Tue Jun 21 15:49:50 2016
New Revision: 273319
URL: http://llvm.org/viewvc/llvm-project?rev=273319&view=rev
Log:
Trying to fix a buffer overflow that broke buildbot
sanitizer-x86_64-linux-fast/builds/13946.
Modified:
cfe/trunk/lib/Tooling/Core/Replacement.cpp
Modified: c
ally addressable: 01 02 03 04 05 06 07
>> Heap left redzone: fa
>> Heap right redzone: fb
>> Freed heap region: fd
>> Stack left redzone: f1
>> Stack mid redzone: f2
>> Stack right redzone: f3
>>
ioeric created this revision.
ioeric added reviewers: klimek, djasper.
ioeric added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
return llvm::Expected<> to carry error status and error information.
This is the first step towards introducing "Error" into tooling::Replacements.
htt
ioeric created this revision.
ioeric added reviewers: klimek, djasper.
ioeric added a subscriber: cfe-commits.
this patch contains changes related to the interface change from
http://reviews.llvm.org/D21601. Only submit this patch after D21601 is
submitted.
http://reviews.llvm.org/D21602
Files:
ioeric added inline comments.
Comment at: lib/Format/Format.cpp:1395
@@ -1394,2 +1394,3 @@
+// If any replacements in \p Replaces fails to apply, this returns \p Replaces.
template
klimek wrote:
> Why would we want to return the same replacements?
this is just
ioeric updated this revision to Diff 61780.
ioeric added a comment.
- fixed commenting.
- Make formatReplacemnts and cleanupAroundReplacements return
llvm::Exppected<...>.
http://reviews.llvm.org/D21601
Files:
include/clang/Format/Format.h
include/clang/Tooling/Core/Replacement.h
lib/For
ioeric updated this revision to Diff 61782.
ioeric added a comment.
- Changes corresponding to new interfaces: formatReplacements and
cleanupAroundReplacements.
http://reviews.llvm.org/D21602
Files:
include-fixer/IncludeFixer.cpp
include-fixer/IncludeFixer.h
include-fixer/tool/ClangInclu
ioeric marked 4 inline comments as done.
ioeric added a comment.
mark previous comments as done
http://reviews.llvm.org/D21601
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ioeric marked 2 inline comments as done.
Comment at: unittests/Format/CleanupTest.cpp:258
@@ +257,3 @@
+auto CleanReplaces = cleanupAroundReplacements(Code, Replaces, Style);
+EXPECT_TRUE((bool)CleanReplaces)
+<< llvm::toString(CleanReplaces.takeError()) << "\n";
-
ioeric updated this revision to Diff 61785.
ioeric added a comment.
- Addressed comments.
http://reviews.llvm.org/D21601
Files:
include/clang/Format/Format.h
include/clang/Tooling/Core/Replacement.h
lib/Format/Format.cpp
lib/Tooling/Core/Replacement.cpp
lib/Tooling/Refactoring.cpp
t
Would EXPECTED_FALSE(!Code) be better?
On Fri, Jun 24, 2016, 17:42 Manuel Klimek wrote:
> klimek added inline comments.
>
>
> Comment at: unittests/Format/CleanupTest.cpp:258
> @@ +257,3 @@
> +auto CleanReplaces = cleanupAroundReplacements(Code, Replaces, Style);
> +EXPE
801 - 900 of 970 matches
Mail list logo