summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/CleanupTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang-format] skip empty lines and comments in the top of the code when ↵Eric Liu2016-06-031-7/+78
| | | | | | | | | | | | | | | | | inserting new headers. Summary: [clang-format] skip empty lines and comments in the top of the code when inserting new headers. Pair-programmed with @hokein Reviewers: djasper Subscribers: ioeric, cfe-commits, hokein, klimek Differential Revision: http://reviews.llvm.org/D20898 llvm-svn: 271664
* [clang-format] insert new #includes into correct blocks when cleaning up ↵Eric Liu2016-05-311-16/+272
| | | | | | | | | | | | | | | | | Replacement with cleanupAroundReplacements(). Summary: When a replacement's offset is set to UINT_MAX or -1U, it is treated as a header insertion replacement by cleanupAroundReplacements(). The new #include directive is then inserted into the correct block. Reviewers: klimek, djasper Subscribers: klimek, cfe-commits, bkramer Differential Revision: http://reviews.llvm.org/D20734 llvm-svn: 271276
* [clang-format] moved unit tests related to replacements cleaner from ↵Eric Liu2016-05-271-0/+41
| | | | | | FormatTest.cpp to CleanUpTest.cpp. llvm-svn: 270971
* Make clang-format cleaner remove redundant commas in list and redundant ↵Eric Liu2016-05-181-0/+127
| | | | | | | | | | | | | | colon in constructor initializer. Summary: Make clang-format cleaner remove redundant commas/colons in constructor initializer list. Reviewers: klimek, djasper Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D19804 llvm-svn: 269888
* Added Fixer implementation and fix() interface in clang-format for removing ↵Eric Liu2016-04-251-0/+118
redundant code. Summary: After applying replacements, redundant code like extra commas or empty namespaces might be introduced. Fixer can detect and remove any redundant code introduced by replacements. The current implementation only handles redundant commas. Reviewers: djasper, klimek Subscribers: ioeric, mprobst, klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D18551 llvm-svn: 267416
OpenPOWER on IntegriCloud