aboutsummaryrefslogtreecommitdiff
path: root/test/Misc/diag-template-diffing.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-11-14 23:57:08 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-11-14 23:57:08 +0000
commit924d5c9853fbdfabc54a473e680f3b6bb8a1b940 (patch)
treeee0e8da08184048f8e78e26c42f75bc6fca481e2 /test/Misc/diag-template-diffing.cpp
parent62221b17c90457df9ca0ff20bb54d634e8951def (diff)
Make template diffing handle integral expressions of various widths correctly.
PR14342. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168005 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Misc/diag-template-diffing.cpp')
-rw-r--r--test/Misc/diag-template-diffing.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Misc/diag-template-diffing.cpp b/test/Misc/diag-template-diffing.cpp
index 2c044f877e..7d01f4695b 100644
--- a/test/Misc/diag-template-diffing.cpp
+++ b/test/Misc/diag-template-diffing.cpp
@@ -792,6 +792,13 @@ void Play3() {
// CHECK-NOELIDE-TREE: [1 != (no argument)]>
}
+namespace PR14342 {
+ template<typename T, short a> struct X {};
+ X<int, (signed char)-1> x = X<long, -1>();
+ X<int, 3UL> y = X<int, 2>();
+ // CHECK-ELIDE-NOTREE: error: no viable conversion from 'X<long, [...]>' to 'X<int, [...]>'
+ // CHECK-ELIDE-NOTREE: error: no viable conversion from 'X<[...], 2>' to 'X<[...], 3UL>'
+}
// CHECK-ELIDE-NOTREE: {{[0-9]*}} errors generated.
// CHECK-NOELIDE-NOTREE: {{[0-9]*}} errors generated.