diff options
author | dim <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
commit | 173a4f43a911175643bda81ee675e8d9269056ea (patch) | |
tree | 47df2c12b57214af6c31e47404b005675b8b7ffc /test/CodeGenCXX/mangle-ms-template-callback.cpp | |
parent | 88f7a7d5251a2d813460274c92decc143a11569b (diff) | |
download | FreeBSD-src-173a4f43a911175643bda81ee675e8d9269056ea.zip FreeBSD-src-173a4f43a911175643bda81ee675e8d9269056ea.tar.gz |
Vendor import of clang RELEASE_350/final tag r216957 (effectively, 3.5.0 release):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_350/final@216957
Diffstat (limited to 'test/CodeGenCXX/mangle-ms-template-callback.cpp')
-rw-r--r-- | test/CodeGenCXX/mangle-ms-template-callback.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/CodeGenCXX/mangle-ms-template-callback.cpp b/test/CodeGenCXX/mangle-ms-template-callback.cpp index 6878148..1a8f82f 100644 --- a/test/CodeGenCXX/mangle-ms-template-callback.cpp +++ b/test/CodeGenCXX/mangle-ms-template-callback.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fblocks -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s +// RUN: %clang_cc1 -fblocks -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s template<typename Signature> class C; @@ -70,3 +70,20 @@ void call_bar() { // CHECK: "\01??$bar@P_EAHH@Z@@YAXP_EAHH@Z@Z" // FYI blocks are not present in MSVS, so we're free to choose the spec. } + +template <void (*Fn)()> void WrapFnPtr() { Fn(); } +template <void (&Fn)()> void WrapFnRef() { Fn(); } +struct Thing { + static void VoidStaticMethod(); +}; +void VoidFn(); +void CallWrapper() { + WrapFnPtr<VoidFn>(); + WrapFnRef<VoidFn>(); + WrapFnPtr<Thing::VoidStaticMethod>(); + WrapFnRef<Thing::VoidStaticMethod>(); +} +// CHECK: call {{.*}} @"\01??$WrapFnPtr@$1?VoidFn@@YAXXZ@@YAXXZ" +// CHECK: call {{.*}} @"\01??$WrapFnRef@$1?VoidFn@@YAXXZ@@YAXXZ" +// CHECK: call {{.*}} @"\01??$WrapFnPtr@$1?VoidStaticMethod@Thing@@SAXXZ@@YAXXZ" +// CHECK: call {{.*}} @"\01??$WrapFnRef@$1?VoidStaticMethod@Thing@@SAXXZ@@YAXXZ" |