diff options
author | Anders Carlsson <andersca@mac.com> | 2009-12-14 01:45:37 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-12-14 01:45:37 +0000 |
commit | e66e2942fce6c1df21cbbc69c39b5ad340ae454e (patch) | |
tree | b19bd03d46b8a8d59965bde8b114857277ed32d3 /clang/test/CodeGenCXX/mangle.cpp | |
parent | 8911229187cb223dba70483678f90bb8e3896ed3 (diff) | |
download | bcm5719-llvm-e66e2942fce6c1df21cbbc69c39b5ad340ae454e.tar.gz bcm5719-llvm-e66e2942fce6c1df21cbbc69c39b5ad340ae454e.zip |
Mangle unary, binary and ternary expressions correctly.
llvm-svn: 91257
Diffstat (limited to 'clang/test/CodeGenCXX/mangle.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/mangle.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/mangle.cpp b/clang/test/CodeGenCXX/mangle.cpp index 38f3c8bd3fb..62d8c6cc1e4 100644 --- a/clang/test/CodeGenCXX/mangle.cpp +++ b/clang/test/CodeGenCXX/mangle.cpp @@ -228,3 +228,31 @@ template<typename T> typename __enable_if<(__is_scalar<T>::__value), void>::__ty template void ft8<int>(); // CHECK: @_Z3ft8IPvEN11__enable_ifIXsr11__is_scalarIT_E7__valueEvE6__typeEv template void ft8<void*>(); + +namespace Expressions { +// Unary operators. + +// CHECK: define void @_ZN11Expressions2f1ILi1EEEvPAplngT_Li2E_i +template <int i> void f1(int (*)[(-i) + 2]) { }; +template void f1<1>(int (*)[1]); + +// CHECK: define void @_ZN11Expressions2f2ILi1EEEvPApsT__i +template <int i> void f2(int (*)[+i]) { }; +template void f2<1>(int (*)[1]); + +// Binary operators. + +// CHECK: define void @_ZN11Expressions2f3ILi1EEEvPAplT_T__i +template <int i> void f3(int (*)[i+i]) { }; +template void f3<1>(int (*)[2]); + +// CHECK: define void @_ZN11Expressions2f4ILi1EEEvPAplplLi2ET_T__i +template <int i> void f4(int (*)[2 + i+i]) { }; +template void f4<1>(int (*)[4]); + +// The ternary operator. +// CHECK: define void @_ZN11Expressions2f4ILb1EEEvPAquT_Li1ELi2E_i +template <bool b> void f4(int (*)[b ? 1 : 2]) { }; +template void f4<true>(int (*)[1]); + +} |