[Reland][Runtimes] Merge 'compile_commands.json' files from runtimes build (#116303)
[llvm-project.git] / clang / test / Format / line-ranges.cpp
blob91b7d2cffc8f04a7c91b646e935c5c74435d34f5
1 // RUN: grep -Ev "// *[A-Z-]+:" %s \
2 // RUN: | clang-format -style=LLVM -lines=1:1 -lines=5:5 \
3 // RUN: | FileCheck -strict-whitespace %s
4 // CHECK: {{^int\ \*i;$}}
5 int*i;
7 // CHECK: {{^int\ \ \*\ \ i;$}}
8 int * i;
10 // CHECK: {{^int\ \*i;$}}
11 int * i;
13 // RUN: not clang-format -lines=0:1 < %s 2>&1 \
14 // RUN: | FileCheck -strict-whitespace -check-prefix=CHECK0 %s
15 // CHECK0: error: start line should be at least 1
17 // RUN: not clang-format -lines=2:1 < %s 2>&1 \
18 // RUN: | FileCheck -strict-whitespace -check-prefix=CHECK1 %s
19 // CHECK1: error: start line should not exceed end line