1// RUN: clang-reorder-fields -record-name ::bar::Foo -fields-order y,x %s -- | FileCheck %s
2
3namespace bar {
4
5#define DEFINE_FIELDS
6
7// This is okay to reorder.
8struct Foo {
9#ifdef DEFINE_FIELDS // CHECK: {{^#ifdef DEFINE_FIELDS}}
10 int x; // CHECK-NEXT: {{^ int y;}}
11 int y; // CHECK-NEXT: {{^ int x;}}
12#endif // CHECK-NEXT: {{^#endif}}
13};
14
15} // end namespace bar
16

source code of clang-tools-extra/test/clang-reorder-fields/PreprocessorDirectiveAroundFields.cpp