diff options
author | John McCall <rjmccall@apple.com> | 2011-04-28 02:52:03 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-04-28 02:52:03 +0000 |
commit | 7f0a0d55c092729565d0feda33c9976194f4c2f4 (patch) | |
tree | 31b6de62bc02f3aaac60bd45e81a607be714ca8d /clang/test/CodeGenCXX/mangle-exprs.cpp | |
parent | 96b07932a30aa73c60220814e23c00804a4050ea (diff) | |
download | bcm5719-llvm-7f0a0d55c092729565d0feda33c9976194f4c2f4.tar.gz bcm5719-llvm-7f0a0d55c092729565d0feda33c9976194f4c2f4.zip |
Implement the mangling for non-ADL call expressions that we just
worked out.
llvm-svn: 130376
Diffstat (limited to 'clang/test/CodeGenCXX/mangle-exprs.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/mangle-exprs.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/mangle-exprs.cpp b/clang/test/CodeGenCXX/mangle-exprs.cpp index e5f26e584b0..5014a9145e8 100644 --- a/clang/test/CodeGenCXX/mangle-exprs.cpp +++ b/clang/test/CodeGenCXX/mangle-exprs.cpp @@ -49,3 +49,19 @@ namespace Casts { // CHECK: define weak_odr void @_ZN5Casts5auto_IiEEvDTnw_DapicvT__EEE( template void auto_<int>(int*); } + +namespace test1 { + short foo(short); + int foo(int); + + // CHECK: define linkonce_odr signext i16 @_ZN5test11aIsEEDTcl3foocvT__EEES1_( + template <class T> auto a(T t) -> decltype(foo(T())) { return foo(t); } + + // CHECK: define linkonce_odr signext i16 @_ZN5test11bIsEEDTcp3foocvT__EEES1_( + template <class T> auto b(T t) -> decltype((foo)(T())) { return (foo)(t); } + + void test(short s) { + a(s); + b(s); + } +} |