brintos

brintos / llvm-project-archived public Read only

0
0
Text · 335 B · 7b531d9 Raw
13 lines · c
1// RUN: clang-reorder-fields -record-name Foo -fields-order z,y,x %s -- | FileCheck %s2 3struct Foo {4  int x;  // CHECK:       {{^  int z;}}5  int y;  // CHECK-NEXT:  {{^  int y;}}6  int z;  // CHECK-NEXT:  {{^  int x;}}7};8 9int main() {10  struct Foo foo = { 0, 1 }; // CHECK: {{^  struct Foo foo = { .y = 1, .x = 0 };}}11  return 0;12}13