mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-03 08:02:41 +00:00

Summary: When sorting #includes, #include directives that have the same text will be deduplicated when sorting #includes, and only the first #include in the duplicate #includes remains. If the `Cursor` is provided and put on a deleted #include, it will be put on the remaining #include in the duplicate #includes. Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D23274 llvm-svn: 278206
15 lines
345 B
C++
15 lines
345 B
C++
// 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 ;
|
|
}
|