summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/instantiate-call.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-06-05 22:42:48 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-06-05 22:42:48 +0000
commit998a591e32613d1e6b223999a4b8db47b468878d (patch)
tree23ae7ff1a2c5ee12c62edafdff72bb734048613c /clang/test/SemaTemplate/instantiate-call.cpp
parent59652d36a5c07413fab97d97feebf7673404d61a (diff)
downloadbcm5719-llvm-998a591e32613d1e6b223999a4b8db47b468878d.tar.gz
bcm5719-llvm-998a591e32613d1e6b223999a4b8db47b468878d.zip
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.
llvm-svn: 132672
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-call.cpp')
-rw-r--r--clang/test/SemaTemplate/instantiate-call.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/test/SemaTemplate/instantiate-call.cpp b/clang/test/SemaTemplate/instantiate-call.cpp
index ad06be33aa2..a0e48c8dec7 100644
--- a/clang/test/SemaTemplate/instantiate-call.cpp
+++ b/clang/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 {
OpenPOWER on IntegriCloud