diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-06-08 00:37:04 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-06-08 00:37:04 +0000 |
commit | c0838d2acb498b0491908d3693514dfec5befe6f (patch) | |
tree | 1e51d964b569fc2557fc2b808a1ba7426071e9fa /test/CodeGenCXX/mangle-ms.cpp | |
parent | 39a03d1015c9413226e8af20d7c00b48e7463c00 (diff) |
PR13047: Fix various abuses of clang::Type in the MS mangler, to make it work
in the presence of type sugar.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158184 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/mangle-ms.cpp')
-rw-r--r-- | test/CodeGenCXX/mangle-ms.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/CodeGenCXX/mangle-ms.cpp b/test/CodeGenCXX/mangle-ms.cpp index ff757685b2..cf4055f72a 100644 --- a/test/CodeGenCXX/mangle-ms.cpp +++ b/test/CodeGenCXX/mangle-ms.cpp @@ -12,6 +12,9 @@ // CHECK: @"\01?j@@3P6GHCE@ZA" // CHECK: @"\01?k@@3PTfoo@@DA" // CHECK: @"\01?l@@3P8foo@@AEHH@ZA" +// CHECK: @"\01?color1@@3PANA" +// CHECK: @"\01?color2@@3PBNA" +// CHECK: @"\01?color3@@3PBY02NA" int a; @@ -41,6 +44,8 @@ public: //CHECK: @"\01??0foo@@QAE@PAD@Z" }f,s1(1),s2((char*)0); +typedef foo (foo2); + struct bar { static int g; }; @@ -72,9 +77,9 @@ int i[10][20]; int (__stdcall *j)(signed char, unsigned char); -const volatile char foo::*k; +const volatile char foo2::*k; -int (foo::*l)(int); +int (foo2::*l)(int); // Static functions are mangled, too. // Also make sure calling conventions, arglists, and throw specs work. @@ -121,3 +126,9 @@ void operator_new_delete() { void (redundant_parens)(); void redundant_parens_use() { redundant_parens(); } // CHECK: @"\01?redundant_parens@@YAXXZ" + +// PR13047 +typedef double RGB[3]; +RGB color1; +extern const RGB color2 = {}; +extern RGB const ((color3)[5]) = {}; |