summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestSelective.cpp
Commit message (Collapse)AuthorAgeFilesLines
* clang-format: [JS] Make requoting of JavaScript string literals onlyDaniel Jasper2016-03-171-0/+12
| | | | | | change affected ranges. llvm-svn: 263713
* clang-format: Don't format unrelated nested blocks.Daniel Jasper2016-02-291-0/+17
| | | | | | | | | | | | | | | With this change: SomeFunction( [] { int i; return i; // Format this line. }, [] { return 2; // Don't "fix" this. }); llvm-svn: 262216
* clang-format: Improve selective comment formatting.Daniel Jasper2016-01-091-0/+7
| | | | | | | | | | | | | | | | | | | Starting here: int x; // Format this line only. int xx; // int xxxxx; // Before: int x; // Format this line only. int xx; // int xxxxx; // After: int x; // Format this line only. int xx; // int xxxxx; // llvm-svn: 257258
* 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