summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/instantiate-declref.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2010-09-17 15:54:40 +0000
committerDimitry Andric <dim@FreeBSD.org>2010-09-17 15:54:40 +0000
commit3d1dcd9bfdb15c49ee34d576a065079ac5c4d29f (patch)
tree0bbe07708f7571f8b5291f6d7b96c102b7c99dee /test/SemaTemplate/instantiate-declref.cpp
parenta0482fa4e7fa27b01184f938097f0666b78016dd (diff)
Notes
Diffstat (limited to 'test/SemaTemplate/instantiate-declref.cpp')
-rw-r--r--test/SemaTemplate/instantiate-declref.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-declref.cpp b/test/SemaTemplate/instantiate-declref.cpp
index 2d27075bd41f4..ced56dfc6abc8 100644
--- a/test/SemaTemplate/instantiate-declref.cpp
+++ b/test/SemaTemplate/instantiate-declref.cpp
@@ -95,3 +95,13 @@ namespace test0 {
};
void g() { X<2>(); }
}
+
+// <rdar://problem/8302161>
+namespace test1 {
+ template <typename T> void f(T const &t) {
+ union { char c; T t_; };
+ c = 'a'; // <- this shouldn't silently fail to instantiate
+ T::foo(); // expected-error {{has no members}}
+ }
+ template void f(int const &); // expected-note {{requested here}}
+}