diff options
Diffstat (limited to 'test/CodeGenCXX/mangle-ms-templates.cpp')
-rw-r--r-- | test/CodeGenCXX/mangle-ms-templates.cpp | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/test/CodeGenCXX/mangle-ms-templates.cpp b/test/CodeGenCXX/mangle-ms-templates.cpp index 7b7f30bb72..10e68248dc 100644 --- a/test/CodeGenCXX/mangle-ms-templates.cpp +++ b/test/CodeGenCXX/mangle-ms-templates.cpp @@ -3,7 +3,7 @@ template<typename T> class Class { public: - void method() {} + Class() {} }; class Typename { }; @@ -32,24 +32,30 @@ class BoolTemplate<true> { void template_mangling() { Class<Typename> c1; - c1.method(); -// CHECK: call {{.*}} @"\01?method@?$Class@VTypename@@@@QAEXXZ" +// CHECK: call {{.*}} @"\01??0?$Class@VTypename@@@@QAE@XZ" Class<const Typename> c1_const; +// CHECK: call {{.*}} @"\01??0?$Class@$$CBVTypename@@@@QAE@XZ" Class<volatile Typename> c1_volatile; +// CHECK: call {{.*}} @"\01??0?$Class@$$CCVTypename@@@@QAE@XZ" Class<const volatile Typename> c1_cv; - c1_const.method(); - c1_volatile.method(); - c1_cv.method(); -// Types with qualifiers have an extra $$C escape when used as template -// arguments. Not sure why. -// CHECK: call {{.*}} @"\01?method@?$Class@$$CBVTypename@@@@QAEXXZ" -// CHECK: call {{.*}} @"\01?method@?$Class@$$CCVTypename@@@@QAEXXZ" -// CHECK: call {{.*}} @"\01?method@?$Class@$$CDVTypename@@@@QAEXXZ" +// CHECK: call {{.*}} @"\01??0?$Class@$$CDVTypename@@@@QAE@XZ" Class<Nested<Typename> > c2; - c2.method(); -// CHECK: call {{.*}} @"\01?method@?$Class@V?$Nested@VTypename@@@@@@QAEXXZ" +// CHECK: call {{.*}} @"\01??0?$Class@V?$Nested@VTypename@@@@@@QAE@XZ" + + Class<int * const> c_intpc; +// CHECK: call {{.*}} @"\01??0?$Class@QAH@@QAE@XZ" + Class<int()> c_ft; +// CHECK: call {{.*}} @"\01??0?$Class@$$A6AHXZ@@QAE@XZ" + Class<int[]> c_inti; +// CHECK: call {{.*}} @"\01??0?$Class@$$BY0A@H@@QAE@XZ" + Class<int[5]> c_int5; +// CHECK: call {{.*}} @"\01??0?$Class@$$BY04H@@QAE@XZ" + Class<const int[5]> c_intc5; +// CHECK: call {{.*}} @"\01??0?$Class@$$BY04$$CBH@@QAE@XZ" + Class<int * const[5]> c_intpc5; +// CHECK: call {{.*}} @"\01??0?$Class@$$BY04QAH@@QAE@XZ" BoolTemplate<false> _false; // CHECK: call {{.*}} @"\01??0?$BoolTemplate@$0A@@@QAE@XZ" |