This revision was automatically updated to reflect the committed changes.
Closed by commit rL281344: Remove redundant comma around parenthesis in
parameter list. (authored by ioeric).
Changed prior to commit:
https://reviews.llvm.org/D24501?vs=71174&id=71175#toc
Repository:
rL LLVM
https://
ioeric added inline comments.
Comment at: unittests/Format/CleanupTest.cpp:125
@@ -123,7 +124,3 @@
std::string Expected = "class A {\nA() {} };";
- std::vector Ranges;
- Ranges.push_back(tooling::Range(17, 0));
- Ranges.push_back(tooling::Range(19, 0));
- std::string Resul
ioeric updated this revision to Diff 71174.
ioeric marked 2 inline comments as done.
ioeric added a comment.
- Minor cleanup.
https://reviews.llvm.org/D24501
Files:
lib/Format/Format.cpp
unittests/Format/CleanupTest.cpp
Index: unittests/Format/CleanupTest.cpp
==
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Some remarks, but looks good.
Comment at: unittests/Format/CleanupTest.cpp:38
@@ +37,3 @@
+ // Returns code after cleanup around \p Offsets.
+ std::string cleanupAroundOff
ioeric added inline comments.
Comment at: unittests/Format/CleanupTest.cpp:147
@@ +146,3 @@
+ // Trailing comma in braces is not removed.
+ std::string Code = "void f() { std::vector v = {1,2,,,3,{4,5,}}; }";
+ std::string Expected = "void f() { std::vector v = {1,2,3,{4,5,}};
ioeric updated this revision to Diff 71158.
ioeric marked an inline comment as done.
ioeric added a comment.
- Refactored cleanup unittest; added more test cases for trailing commas.
https://reviews.llvm.org/D24501
Files:
lib/Format/Format.cpp
unittests/Format/CleanupTest.cpp
Index: unitte
djasper added inline comments.
Comment at: unittests/Format/CleanupTest.cpp:147
@@ +146,3 @@
+ // Trailing comma in braces is not removed.
+ std::string Code = "void f() { std::vector v = {1,2,,,3,{4,5,}}; }";
+ std::string Expected = "void f() { std::vector v = {1,2,3,{4,5,}};
ioeric created this revision.
ioeric added a reviewer: djasper.
ioeric added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
https://reviews.llvm.org/D24501
Files:
lib/Format/Format.cpp
unittests/Format/CleanupTest.cpp
Index: unittests/Format/CleanupTest.cpp
===