From 6b9a6e390fbb92c40eb9c6ac9e7abbd88dd7a767 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 3 May 2012 16:53:59 +0000 Subject: Vendor import of clang release_31 branch r155985: http://llvm.org/svn/llvm-project/cfe/branches/release_31@155985 --- 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 ced56dfc6abc..7d4a2ff6a3ff 100644 --- a/test/SemaTemplate/instantiate-declref.cpp +++ b/test/SemaTemplate/instantiate-declref.cpp @@ -105,3 +105,13 @@ namespace test1 { } template void f(int const &); // expected-note {{requested here}} } + +namespace test2 { + template void f() { + T::error; // expected-error {{no member}} + } + void g() { + // This counts as an odr-use, so should trigger the instantiation of f. + (void)&f; // expected-note {{here}} + } +} -- cgit v1.2.3