You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
431 B
19 lines
431 B
// RUN: clang-reorder-fields -record-name ::Foo -fields-order y,x %s -- | FileCheck %s
|
|
|
|
struct Foo {
|
|
int x; // CHECK: {{^ double y;}}
|
|
double y; // CHECK-NEXT: {{^ int x;}}
|
|
};
|
|
|
|
namespace bar {
|
|
struct Foo {
|
|
int x; // CHECK: {{^ int x;}}
|
|
double y; // CHECK-NEXT: {{^ double y;}}
|
|
};
|
|
} // end namespace bar
|
|
|
|
int main() {
|
|
bar::Foo foo = { 1, 1.7 }; // CHECK: {{^ bar::Foo foo = { 1, 1.7 };}}
|
|
return 0;
|
|
}
|