xref: /llvm-project/clang/test/Format/remove-duplicate-includes.cpp (revision a992afe80977bedcbe85a1140efcc8fd28878df1)
1 // RUN: grep -Ev "// *[A-Z-]+:" %s \
2 // RUN:   | clang-format -style="{BasedOnStyle: LLVM, SortIncludes: true}" -lines=1:5 \
3 // RUN:   | FileCheck -strict-whitespace %s
4 // CHECK: {{^#include\ <a>$}}
5 #include  <a>
6 // CHECK: {{^#include\ <b>$}}
7 #include  <b>
8 #include  <a>
9 #include  <b>
10 #include  <b>
11 {
12 // CHECK: {{^\ \ int x\ \ ;$}}
13   int x  ;
14 }
15