diff options
Diffstat (limited to 'clang/test/CodeGenCXX/mangle.cpp')
| -rw-r--r-- | clang/test/CodeGenCXX/mangle.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/mangle.cpp b/clang/test/CodeGenCXX/mangle.cpp index e18ca03d1be..3f966902a21 100644 --- a/clang/test/CodeGenCXX/mangle.cpp +++ b/clang/test/CodeGenCXX/mangle.cpp @@ -414,3 +414,42 @@ namespace test3 { get_p_2(obj); } } + +// CHECK: define void @_ZN5test41gEPNS_3zedIXadL_ZNS_3foo3barEEEEE +namespace test4 { + struct foo { int bar; }; + template <int (foo::*)> + struct zed {}; + void g(zed<&foo::bar>*) + {} +} +// CHECK: define void @_ZN5test51gEPNS_3zedIXadL_ZNS_3foo3barEEEEE +namespace test5 { + struct foo { static int bar; }; + template <int *> + struct zed {}; + void g(zed<&foo::bar>*) + {} +} +// CHECK: define void @_ZN5test61gEPNS_3zedIXadL_ZNS_3foo3barEvEEEE +namespace test6 { + struct foo { int bar(); }; + template <int (foo::*)()> + struct zed {}; + void g(zed<&foo::bar>*) + {} +} +// CHECK: define void @_ZN5test71gEPNS_3zedIXadL_ZNS_3foo3barEvEEEE +namespace test7 { + struct foo { static int bar(); }; + template <int (*f)()> + struct zed {}; + void g(zed<&foo::bar>*) + {} +} +// CHECK: define void @_ZN5test81AILZNS_1B5valueEEE3incEv +namespace test8 { + template <int &counter> class A { void inc() { counter++; } }; + class B { static int value; }; + template class A<B::value>; +} |

