diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-03-11 14:07:00 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-03-11 14:07:00 +0000 |
commit | d9800728cc3e7f478eec4d4b19af5b808ac51942 (patch) | |
tree | 8f757be4d0ac1a26cd49b211b8fba15798292bae /test/CodeGenCXX/mangle.cpp | |
parent | 069ace5adc444a159003c29e85e166cee491ad39 (diff) |
Correctly mangle address of member in template arguments. Fixes PR6460
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98254 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/mangle.cpp')
-rw-r--r-- | test/CodeGenCXX/mangle.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/CodeGenCXX/mangle.cpp b/test/CodeGenCXX/mangle.cpp index e18ca03d1b..3f966902a2 100644 --- a/test/CodeGenCXX/mangle.cpp +++ b/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>; +} |