diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-09-03 21:38:09 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-09-03 21:38:09 +0000 |
commit | c68afe2cbe7f875a9243c411077602fb5f5dc74b (patch) | |
tree | 04412391650d20f0e45473601ed7d5f5ad8fe44e /test/SemaTemplate/member-access-expr.cpp | |
parent | 9d436205be3e4c05854530134be61b46b13136ff (diff) | |
download | clang-c68afe2cbe7f875a9243c411077602fb5f5dc74b.tar.gz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80953 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/member-access-expr.cpp')
-rw-r--r-- | test/SemaTemplate/member-access-expr.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/SemaTemplate/member-access-expr.cpp b/test/SemaTemplate/member-access-expr.cpp index f41dc2120a..408e2bb53c 100644 --- a/test/SemaTemplate/member-access-expr.cpp +++ b/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}} } |