From 3d1dcd9bfdb15c49ee34d576a065079ac5c4d29f Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Fri, 17 Sep 2010 15:54:40 +0000 Subject: Vendor import of clang r114020 (from the release_28 branch): http://llvm.org/svn/llvm-project/cfe/branches/release_28@114020 Approved by: rpaulo (mentor) --- test/SemaTemplate/instantiate-declref.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/SemaTemplate/instantiate-declref.cpp') 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>(); } } + +// +namespace test1 { + template 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}} +} -- cgit v1.2.3