]> granicus.if.org Git - clang/commitdiff
Add a few more test cases for the -cxx-abi microsoft mangler. Some of them were broke...
authorTimur Iskhodzhanov <timurrrr@google.com>
Wed, 27 Jun 2012 01:38:25 +0000 (01:38 +0000)
committerTimur Iskhodzhanov <timurrrr@google.com>
Wed, 27 Jun 2012 01:38:25 +0000 (01:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159248 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenCXX/mangle-ms.cpp

index 326a848fcb96c760e27e086d178380f1aabf8e0f..58d48cbb60a5bebf5b9b92826ec6656b52d3e1cc 100644 (file)
@@ -42,6 +42,9 @@ public:
 
   foo(char *q){}
 //CHECK: @"\01??0foo@@QAE@PAD@Z"
+
+  static foo* static_method() { return 0; }
+
 }f,s1(1),s2((char*)0);
 
 typedef foo (foo2);
@@ -62,8 +65,17 @@ enum quux {
   qthree
 };
 
-int foo::operator+(int a) {return a;}
-// CHECK: @"\01??Hfoo@@QAEHH@Z"
+foo bar() { return foo(); }
+//CHECK: @"\01?bar@@YA?AVfoo@@XZ"
+
+int foo::operator+(int a) {
+//CHECK: @"\01??Hfoo@@QAEHH@Z"
+
+  foo::static_method();
+//CHECK: @"\01?static_method@foo@@SAPAV1@XZ"
+  bar();
+  return a;
+}
 
 const short foo::d = 0;
 volatile long foo::e;