diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-06-05 22:42:48 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-06-05 22:42:48 +0000 |
commit | f50e88a793dd5bc7073c717fec78912e3234e95a (patch) | |
tree | 5c3f5d715bfd2623a8f80bd27ee5b61142edb48a /test/SemaTemplate/instantiate-call.cpp | |
parent | 25a857b8039bc86695614126bfe4f21035d6c76b (diff) | |
download | clang-f50e88a793dd5bc7073c717fec78912e3234e95a.tar.gz clang-f50e88a793dd5bc7073c717fec78912e3234e95a.tar.bz2 clang-f50e88a793dd5bc7073c717fec78912e3234e95a.tar.xz |
Fix PR10053: Improve diagnostics and error recovery for code which some compilers incorrectly accept due to a lack of proper support for two-phase name lookup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132672 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/instantiate-call.cpp')
-rw-r--r-- | test/SemaTemplate/instantiate-call.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/SemaTemplate/instantiate-call.cpp b/test/SemaTemplate/instantiate-call.cpp index ad06be33aa..a0e48c8dec 100644 --- a/test/SemaTemplate/instantiate-call.cpp +++ b/test/SemaTemplate/instantiate-call.cpp @@ -24,7 +24,8 @@ namespace N3 { template<typename T, typename Result> struct call_f0 { void test_f0(T t) { - Result &result = f0(t); // expected-error 2{{undeclared identifier}} + Result &result = f0(t); // expected-error {{undeclared identifier}} \ + expected-error {{neither visible in the template definition nor found by argument dependent lookup}} } }; } @@ -32,7 +33,7 @@ namespace N3 { template struct N3::call_f0<int, char&>; // expected-note{{instantiation}} template struct N3::call_f0<N1::X0, int&>; -short& f0(char); +short& f0(char); // expected-note {{should be declared prior to the call site}} namespace N4 { template<typename T, typename Result> struct call_f0 { |