Revert "[lldb][test] Remove compiler version check and use regex" (#124101)
[llvm-project.git] / clang-tools-extra / test / clang-reorder-fields / PlainCStructFieldsOrder.c
blob32ce569df943fde2d17a4c0c708cbee15d19f221
1 // RUN: clang-reorder-fields -record-name Foo -fields-order z,w,y,x %s -- | FileCheck %s
3 struct Foo {
4 const int* x; // CHECK: {{^ double z;}}
5 int y; // CHECK-NEXT: {{^ int w;}}
6 double z; // CHECK-NEXT: {{^ int y;}}
7 int w; // CHECK-NEXT: {{^ const int\* x}}
8 };
10 int main(void) {
11 const int x = 13;
12 struct Foo foo = { &x, 0, 1.29, 17 }; // CHECK: {{^ struct Foo foo = { 1.29, 17, 0, &x };}}
13 return 0;