diff options
author | John McCall <rjmccall@apple.com> | 2010-08-18 19:18:59 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-08-18 19:18:59 +0000 |
commit | 5e1e89b8af283af34943a477dc6378f1a641df26 (patch) | |
tree | 3ea6473a7f8c764a9153d2920191251f33549e1e /test/CodeGenCXX/mangle.cpp | |
parent | 19ffd492a31a25fb691098bf79f317e5f3edf177 (diff) |
Contextual arity is a feature of mangling expressions; kill off
mangleCallExpression. Also, operator names with unknown arity should
be mangled as binary operators; this is actually covered by an oddly-
positioned sentence in the ABI document. Fixes PR7891.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111395 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/mangle.cpp')
-rw-r--r-- | test/CodeGenCXX/mangle.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/CodeGenCXX/mangle.cpp b/test/CodeGenCXX/mangle.cpp index 6636c926ae..c7a6e0096b 100644 --- a/test/CodeGenCXX/mangle.cpp +++ b/test/CodeGenCXX/mangle.cpp @@ -557,3 +557,31 @@ namespace test17 { func<B>(); // { dg-error "sorry, unimplemented" } } } + +// PR7891 +namespace test18 { + struct A { + int operator+(); + int operator-(); + int operator*(); + int operator&(); + }; + template <int (A::*)()> struct S {}; + + template <typename T> void f(S<&T::operator+>) {} + template void f<A>(S<&A::operator+>); + + template <typename T> void f(S<&T::operator- >) {} + template void f<A>(S<&A::operator- >); + + template <typename T> void f(S<&T::operator*>) {} + template void f<A>(S<&A::operator*>); + + template <typename T> void f(S<&T::operator&>) {} + template void f<A>(S<&A::operator&>); + + // CHECK: define weak_odr void @_ZN6test181fINS_1AEEEvNS_1SIXadsrT_plEEE + // CHECK: define weak_odr void @_ZN6test181fINS_1AEEEvNS_1SIXadsrT_miEEE + // CHECK: define weak_odr void @_ZN6test181fINS_1AEEEvNS_1SIXadsrT_mlEEE + // CHECK: define weak_odr void @_ZN6test181fINS_1AEEEvNS_1SIXadsrT_anEEE +} |