1// RUN: clang-reorder-fields -record-name Foo -fields-order z,y,x %s -- | FileCheck %s
2
3// The order of fields should not change.
4class Foo {
5public:
6 int x; // CHECK: {{^ int x;}}
7
8private:
9 int y; // CHECK: {{^ int y;}}
10 int z; // CHECK-NEXT: {{^ int z;}}
11};
12
13int main() {
14 Foo foo;
15 return 0;
16}
17

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