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
diff --git a/test/Misc/diag-template-diffing.cpp b/test/Misc/diag-template-diffing.cpp
index 2c044f8..7d01f46 100644
--- a/test/Misc/diag-template-diffing.cpp
+++ b/test/Misc/diag-template-diffing.cpp
@@ -792,6 +792,13 @@
 // 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.