summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestSelective.cpp
Commit message (Collapse)AuthorAgeFilesLines
* clang-format: Simplify and improve stop condition for formattingDaniel Jasper2015-11-021-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | unaffected lines with incorrect initial indent. Starting from: namespace { int i; // There shouldn't be indentation here. int j; // <- call clang-format on this line. } Before: namespace { int i; int j; } After: namespace { int i; int j; } llvm-svn: 251824
* clang-format: Be slightly more cautious when formatting subsequent lines ↵Daniel Jasper2015-11-011-0/+21
| | | | | | | | | | | | | | | | | after a change. With r251474, clang-format could indent the entire rest of the file, if there is a missing closing brace, e.g. while writing code in an editor. Summary: With this change, clang-format stops formatting when either it leaves the current scope or when it comes back to the initial scope after going into a nested one. Reviewers: klimek Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D14213 llvm-svn: 251760
* clang-format: When a line is formatted, also format subsequence lines if ↵Daniel Jasper2015-10-281-8/+18
| | | | | | | | | | | | | | their indent is off. Summary: This is especially important so that if a change is solely inserting a block around a few statements, clang-format-diff.py will still clean up and add indentation to the inner parts. Reviewers: klimek Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D14105 llvm-svn: 251474
* clang-format: NFC. Move testing of selective formatting to a separate file.Daniel Jasper2015-06-151-0/+441
This is a first step for splitting the huge FormatTest.cpp into separate files to make it easier to find specific tests. llvm-svn: 239730
OpenPOWER on IntegriCloud