Mercurial > hg > CbC > CbC_llvm
diff clang-tools-extra/test/clang-reorder-fields/CStructAmbiguousName.cpp @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/clang-tools-extra/test/clang-reorder-fields/CStructAmbiguousName.cpp Thu Feb 13 15:10:13 2020 +0900 @@ -0,0 +1,18 @@ +// 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; +}