summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/member-access-expr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/member-access-expr.cpp')
-rw-r--r--test/SemaTemplate/member-access-expr.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/test/SemaTemplate/member-access-expr.cpp b/test/SemaTemplate/member-access-expr.cpp
index f1aa30ec32a6..8dba2e68d656 100644
--- a/test/SemaTemplate/member-access-expr.cpp
+++ b/test/SemaTemplate/member-access-expr.cpp
@@ -1,4 +1,7 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
+
template<typename T>
void call_f0(T x) {
x.Base::f0();
@@ -28,15 +31,25 @@ 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}} \
- // expected-error 2{{no member named}}
+ typedef TheBase CrazyBase;
+#if __cplusplus <= 199711L
+ // expected-note@-2 {{lookup from the current scope refers here}}
+#endif
+
+ x.CrazyBase::f0(); // expected-error 2{{no member named}}
+#if __cplusplus <= 199711L
+ // expected-error@-2 {{lookup of 'CrazyBase' in member access expression is ambiguous}}
+#endif
+
}
struct OtherBase { };
struct X1 : Base, OtherBase {
- typedef OtherBase CrazyBase; // expected-note{{object type}}
+ typedef OtherBase CrazyBase;
+#if __cplusplus <= 199711L
+ // expected-note@-2 {{lookup in the object type 'X1' refers here}}
+#endif
};
void test_f0_through_typedef2(X0 x0, X1 x1) {