brintos

brintos / llvm-project-archived public Read only

0
0
Text · 632 B · cda5f56 Raw
17 lines · cpp
1// RUN: clang-reorder-fields --extra-arg="-std=c++17" -record-name Foo -fields-order z,y,x %s -- 2>&1 | FileCheck --check-prefix=CHECK-MESSAGES %s2// RUN: clang-reorder-fields --extra-arg="-std=c++17" -record-name Foo -fields-order z,y,x %s -- | FileCheck %s3 4// The order of fields should not change.5class Foo {6public:7  int x;  // CHECK:       {{^  int x;}}8  int y;  // CHECK-NEXT:  {{^  int y;}}9  int z;  // CHECK-NEXT:  {{^  int z;}}10};11 12int main() {13  // CHECK-MESSAGES: :[[@LINE+1]]:13: Only full initialization without implicit values is supported14  Foo foo = { 0, 1 }; // CHECK: {{^  Foo foo = { 0, 1 };}}15  return 0;16}17