summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/member-access-expr.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-09-03 21:38:09 +0000
committerDouglas Gregor <dgregor@apple.com>2009-09-03 21:38:09 +0000
commit2b6ca46c6b66096bc5dfc6f82c46cfb1761f4f53 (patch)
tree7881f432fe5f94b677450a7615703ef1e31e3782 /clang/test/SemaTemplate/member-access-expr.cpp
parent59a1cd4a063a65983551a73dd858116fe2a01bbc (diff)
downloadbcm5719-llvm-2b6ca46c6b66096bc5dfc6f82c46cfb1761f4f53.tar.gz
bcm5719-llvm-2b6ca46c6b66096bc5dfc6f82c46cfb1761f4f53.zip
Improve template instantiation for member access expressions that
involve qualified names, e.g., x->Base::f. We now maintain enough information in the AST to compare the results of the name lookup of "Base" in the scope of the postfix-expression (determined at template definition time) and in the type of the object expression. llvm-svn: 80953
Diffstat (limited to 'clang/test/SemaTemplate/member-access-expr.cpp')
-rw-r--r--clang/test/SemaTemplate/member-access-expr.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/SemaTemplate/member-access-expr.cpp b/clang/test/SemaTemplate/member-access-expr.cpp
index f41dc2120ab..408e2bb53c4 100644
--- a/clang/test/SemaTemplate/member-access-expr.cpp
+++ b/clang/test/SemaTemplate/member-access-expr.cpp
@@ -1,5 +1,4 @@
// RUN: clang-cc -fsyntax-only -verify %s
-// XFAIL
template<typename T>
void call_f0(T x) {
x.Base::f0();
@@ -30,7 +29,8 @@ void test_f0_through_typedef(X0 x0) {
template<typename TheBase, typename T>
void call_f0_through_typedef2(T x) {
typedef TheBase CrazyBase; // expected-note{{current scope}}
- x.CrazyBase::f0(); // expected-error{{ambiguous}}
+ x.CrazyBase::f0(); // expected-error{{ambiguous}} \
+ // expected-error 2{{no member named}}
}
struct OtherBase { };
@@ -41,8 +41,8 @@ struct X1 : Base, OtherBase {
void test_f0_through_typedef2(X0 x0, X1 x1) {
call_f0_through_typedef2<Base>(x0);
- call_f0_through_typedef2<OtherBase>(x1);
- call_f0_through_typedef2<Base>(x1); // expected-note{{here}}
+ call_f0_through_typedef2<OtherBase>(x1); // expected-note{{instantiation}}
+ call_f0_through_typedef2<Base>(x1); // expected-note{{instantiation}}
}
OpenPOWER on IntegriCloud