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