summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/member-access-expr.cpp
diff options
context:
space:
mode:
authorCharles Li <charles_li@playstation.sony.com>2016-04-14 23:47:07 +0000
committerCharles Li <charles_li@playstation.sony.com>2016-04-14 23:47:07 +0000
commit1a88adbb27a21e7728253c2f932b41009e314985 (patch)
tree7dafdd87f8d899c1dd638dcd2bc171df4ad58706 /clang/test/SemaTemplate/member-access-expr.cpp
parent4960fbf391360ae04c5815fca2fd647567a977f3 (diff)
downloadbcm5719-llvm-1a88adbb27a21e7728253c2f932b41009e314985.tar.gz
bcm5719-llvm-1a88adbb27a21e7728253c2f932b41009e314985.zip
Lit C++11 Compatibility Patch #8
24 tests have been updated for C++11 compatibility. llvm-svn: 266387
Diffstat (limited to 'clang/test/SemaTemplate/member-access-expr.cpp')
-rw-r--r--clang/test/SemaTemplate/member-access-expr.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/clang/test/SemaTemplate/member-access-expr.cpp b/clang/test/SemaTemplate/member-access-expr.cpp
index f1aa30ec32a..8dba2e68d65 100644
--- a/clang/test/SemaTemplate/member-access-expr.cpp
+++ b/clang/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) {
OpenPOWER on IntegriCloud