brintos

brintos / llvm-project-archived public Read only

0
0
Text · 418 B · fee6b0e Raw
17 lines · cpp
1// RUN: clang-reorder-fields -record-name ::bar::Foo -fields-order z,y,x %s -- | FileCheck %s2 3namespace bar {4 5#define ADD_Z6 7// The order of fields should not change.8struct Foo {9  int x;     // CHECK:      {{^ int x;}}10  int y;     // CHECK-NEXT: {{^ int y;}}11#ifdef ADD_Z // CHECK-NEXT: {{^#ifdef ADD_Z}}12  int z;     // CHECK-NEXT: {{^ int z;}}13#endif       // CHECK-NEXT: {{^#endif}}14};15 16} // end namespace bar17