diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2012-05-03 16:53:59 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2012-05-03 16:53:59 +0000 |
commit | 6b9a6e390fbb92c40eb9c6ac9e7abbd88dd7a767 (patch) | |
tree | 2e51705e103e92c7be1b21e8bd8ffd5b5d0e4d52 /test/SemaTemplate/instantiate-declref.cpp | |
parent | dbe13110f59f48b4dbb7552b3ac2935acdeece7f (diff) |
Diffstat (limited to 'test/SemaTemplate/instantiate-declref.cpp')
-rw-r--r-- | test/SemaTemplate/instantiate-declref.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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<typename T> void f() { + T::error; // expected-error {{no member}} + } + void g() { + // This counts as an odr-use, so should trigger the instantiation of f<int>. + (void)&f<int>; // expected-note {{here}} + } +} |