1// RUN: clang-reorder-fields -record-name ::bar::Foo -fields-order z,y,x %s -- | FileCheck %s
2
3namespace bar {
4
5#define ADD_Z
6
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 bar
17

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