llvm-for-llvmta/tools/clang/test/Format/remove-duplicate-includes.cpp

15 lines
345 B
C++
Raw Normal View History

2022-04-25 13:02:35 +02:00
// RUN: grep -Ev "// *[A-Z-]+:" %s \
// RUN: | clang-format -style="{BasedOnStyle: LLVM, SortIncludes: true}" -lines=1:5 \
// RUN: | FileCheck -strict-whitespace %s
// CHECK: {{^#include\ <a>$}}
#include <a>
// CHECK: {{^#include\ <b>$}}
#include <b>
#include <a>
#include <b>
#include <b>
{
// CHECK: {{^\ \ int x\ \ ;$}}
int x ;
}