mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 10:56:07 +00:00

With this patch, clang-format will try to keep the cursor at the original code position in editor integrations (implemented for emacs and vim). This means, after formatting, clang-format will try to keep the cursor on the same character of the same token. llvm-svn: 182373
7 lines
234 B
C++
7 lines
234 B
C++
// RUN: grep -Ev "// *[A-Z-]+:" %s > %t2.cpp
|
|
// RUN: clang-format -style=LLVM %t2.cpp -cursor=6 > %t.cpp
|
|
// RUN: FileCheck -strict-whitespace -input-file=%t.cpp %s
|
|
// CHECK: {{^\{ "Cursor": 4 \}$}}
|
|
// CHECK: {{^int\ \i;$}}
|
|
int i;
|