aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/instantiate-declref.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-08-17 21:27:17 +0000
committerJohn McCall <rjmccall@apple.com>2010-08-17 21:27:17 +0000
commitec8045d3f0375302eadaa63deb373bacaf25a569 (patch)
tree7ff7d615276f2a81884142b69b1d729d02c4d236 /test/SemaTemplate/instantiate-declref.cpp
parent11e6f610916437c5e67065533f5ecd98bc56794d (diff)
Implicit decl ref expressions might not have name locations; don't silently
fail to instantiate them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111293 91177308-0d34-0410-b5e6-96231b3b80d8
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 2d27075bd4..ced56dfc6a 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}}
+}