llvm-capstone/clang/test/Format/ranges.cpp
Daniel Jasper a1036e5d08 clang-format: When a line is formatted, also format subsequence lines if 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
2015-10-28 01:08:22 +00:00

12 lines
279 B
C++

// RUN: grep -Ev "// *[A-Z-]+:" %s \
// RUN: | clang-format -style=LLVM -offset=2 -length=0 -offset=28 -length=0 \
// RUN: | FileCheck -strict-whitespace %s
// CHECK: {{^int\ \*i;$}}
int*i;
// CHECK: {{^int\ \ \*\ \ i;$}}
int * i;
// CHECK: {{^int\ \*i;$}}
int * i;