blob: 5bafcd19ea829b6c85afc8b1367b1a3b91172b9a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// RUN: clang-reorder-fields -record-name ::bar::Foo -fields-order z,y,x %s -- | FileCheck %s
namespace bar {
#define FIELDS_DECL int x; int y; // CHECK: {{^#define FIELDS_DECL int x; int y;}}
// The order of fields should not change.
struct Foo {
FIELDS_DECL // CHECK: {{^ FIELDS_DECL}}
int z; // CHECK-NEXT: {{^ int z;}}
};
} // end namespace bar
|