diff options
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 ced56df..7d4a2ff 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}} + } +} |