summaryrefslogtreecommitdiffstats
path: root/clang/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
commitc2c982c78b0f964d8f7430b2f396b829520a80a1 (patch)
treebe51154eb8dfc2f3de67737d25c1d0634cb8f3f1 /clang/test/Misc/diag-template-diffing.cpp
parent0b50cb79ada2f361b11571b56350587012d0f1da (diff)
downloadbcm5719-llvm-c2c982c78b0f964d8f7430b2f396b829520a80a1.tar.gz
bcm5719-llvm-c2c982c78b0f964d8f7430b2f396b829520a80a1.zip
Make template diffing handle integral expressions of various widths correctly.
PR14342. llvm-svn: 168005
Diffstat (limited to 'clang/test/Misc/diag-template-diffing.cpp')
-rw-r--r--clang/test/Misc/diag-template-diffing.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Misc/diag-template-diffing.cpp b/clang/test/Misc/diag-template-diffing.cpp
index 2c044f877e8..7d01f4695b0 100644
--- a/clang/test/Misc/diag-template-diffing.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud