aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/default-arguments.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-11-11 21:54:23 +0000
committerDouglas Gregor <dgregor@apple.com>2009-11-11 21:54:23 +0000
commitf35f828f9883123772a9731af190a608f3236ef4 (patch)
tree01f5a4ff2168279d314ec964b4531d78185a8f8b /test/SemaTemplate/default-arguments.cpp
parent961c76ea8d5089293e448e5d538570653e28080c (diff)
Improve diagnostics when a default template argument does not match
with its corresponding template parameter. This can happen when we performed some substitution into the default template argument and what we had doesn't match any more, e.g., template<int> struct A; template<typename T, template<T> class X = A> class B; B<long> b; Previously, we'd emit a pretty but disembodied diagnostic showing how the default argument didn't match the template parameter. The diagnostic was good, but nothing tied it to the *use* of the default argument in "B<long>". This commit fixes that. Also, tweak the counting of active template instantiations to avoid counting non-instantiation records, such as those we create for (surprise!) checking default arguments, instantiating default arguments, and performing substitutions as part of template argument deduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86884 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/default-arguments.cpp')
-rw-r--r--test/SemaTemplate/default-arguments.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/SemaTemplate/default-arguments.cpp b/test/SemaTemplate/default-arguments.cpp
index e1999218dd..e082693aa5 100644
--- a/test/SemaTemplate/default-arguments.cpp
+++ b/test/SemaTemplate/default-arguments.cpp
@@ -116,5 +116,5 @@ template<typename T,
struct X6 {};
X6<int> x6a;
-X6<long> x6b;
+X6<long> x6b; // expected-note{{while checking a default template argument}}
X6<long, X5b> x6c;