llvm-capstone/clang/test/Format/disable-include-sorting.cpp
Daniel Jasper da44677082 clang-format: Enable #include sorting by default.
This has seen quite some usage and I am not aware of any issues. Also
add a style option to enable/disable include sorting. The existing
command line flag can from now on be used to override whatever is set
in the style.

llvm-svn: 253202
2015-11-16 12:38:56 +00:00

11 lines
312 B
C++

// RUN: clang-format %s | FileCheck %s
// RUN: clang-format %s -sort-includes -style="{SortIncludes: false}" | FileCheck %s
// RUN: clang-format %s -sort-includes=false | FileCheck %s -check-prefix=NOT-SORTED
#include <b>
#include <a>
// CHECK: <a>
// CHECK-NEXT: <b>
// NOT-SORTED: <b>
// NOT-SORTED-NEXT: <a>