From da446770823be1b1d1562734e55da7c1a5f2579c Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Mon, 16 Nov 2015 12:38:56 +0000 Subject: 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 --- clang/test/Format/disable-include-sorting.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 clang/test/Format/disable-include-sorting.cpp (limited to 'clang/test') diff --git a/clang/test/Format/disable-include-sorting.cpp b/clang/test/Format/disable-include-sorting.cpp new file mode 100644 index 00000000000..875a0af400e --- /dev/null +++ b/clang/test/Format/disable-include-sorting.cpp @@ -0,0 +1,10 @@ +// 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 +#include +// CHECK: +// CHECK-NEXT: +// NOT-SORTED: +// NOT-SORTED-NEXT: -- cgit v1.2.3