diff options
author | John McCall <rjmccall@apple.com> | 2012-08-18 04:51:52 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2012-08-18 04:51:52 +0000 |
commit | 54c86f746f9e4431fa3855fe7a92c6827a357e85 (patch) | |
tree | 151fc99d78fc78a64ec2f7ea507087464142bba8 /test/CodeGenCXX/mangle-template.cpp | |
parent | 0576681bac125be07f77f66b02a3dba2c3a24557 (diff) |
When mangling a negative number, remember that negating it does not
always yield a positive number. Just print the negated result as an
unsigned number.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162163 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/mangle-template.cpp')
-rw-r--r-- | test/CodeGenCXX/mangle-template.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGenCXX/mangle-template.cpp b/test/CodeGenCXX/mangle-template.cpp index 05c3a5851e..488f6f3bb1 100644 --- a/test/CodeGenCXX/mangle-template.cpp +++ b/test/CodeGenCXX/mangle-template.cpp @@ -170,3 +170,15 @@ namespace test12 { test<const int&, n>(); } } + +// rdar://problem/12072531 +// Test the boundary condition of minimal signed integers. +namespace test13 { + template <char c> char returnChar() { return c; } + template char returnChar<-128>(); + // CHECK: @_ZN6test1310returnCharILcn128EEEcv() + + template <short s> short returnShort() { return s; } + template short returnShort<-32768>(); + // CHECK: @_ZN6test1311returnShortILsn32768EEEsv() +} |