summaryrefslogtreecommitdiffstats
path: root/clang/test/Misc/diag-template-diffing-cxx98.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2013-03-14 20:44:43 +0000
committerDouglas Gregor <dgregor@apple.com>2013-03-14 20:44:43 +0000
commit7c5c3789c58ba428b5681249ee31f0ff9aa338fd (patch)
treeca2ba6262de1f9f7b485fc6f80533d7a0294415a /clang/test/Misc/diag-template-diffing-cxx98.cpp
parent26858401a2f229e33ec6ad288577bcfe6208047a (diff)
downloadbcm5719-llvm-7c5c3789c58ba428b5681249ee31f0ff9aa338fd.tar.gz
bcm5719-llvm-7c5c3789c58ba428b5681249ee31f0ff9aa338fd.zip
[PR15513/<rdar://problem/13409707>] Template arguments in diagnostics aren't always known at compile time.
llvm-svn: 177110
Diffstat (limited to 'clang/test/Misc/diag-template-diffing-cxx98.cpp')
-rw-r--r--clang/test/Misc/diag-template-diffing-cxx98.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/clang/test/Misc/diag-template-diffing-cxx98.cpp b/clang/test/Misc/diag-template-diffing-cxx98.cpp
index cd40ccc3748..f374fbc4179 100644
--- a/clang/test/Misc/diag-template-diffing-cxx98.cpp
+++ b/clang/test/Misc/diag-template-diffing-cxx98.cpp
@@ -4,4 +4,14 @@ namespace PR14342 {
template<typename T, char a> struct X {};
X<int, 1> x = X<long, 257>();
// CHECK: error: no viable conversion from 'X<long, [...]>' to 'X<int, [...]>'
-} \ No newline at end of file
+}
+
+namespace PR15513 {
+ template <int x, int y = x+1>
+ class A {};
+
+ void foo(A<0> &M) {
+ // CHECK: no viable conversion from 'A<[...], (default) x + 1>' to 'A<[...], 0>'
+ A<0, 0> N = M;
+ }
+}
OpenPOWER on IntegriCloud