| 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. |
| 4 | class Foo { |
| 5 | public: |
| 6 | int x; // CHECK: {{^ int x;}} |
| 7 | |
| 8 | private: |
| 9 | int y; // CHECK: {{^ int y;}} |
| 10 | int z; // CHECK-NEXT: {{^ int z;}} |
| 11 | }; |
| 12 | |
| 13 | int main() { |
| 14 | Foo foo; |
| 15 | return 0; |
| 16 | } |
| 17 |
