summaryrefslogtreecommitdiff
path: root/test/SemaCXX/qual-id-test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/qual-id-test.cpp')
-rw-r--r--test/SemaCXX/qual-id-test.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/test/SemaCXX/qual-id-test.cpp b/test/SemaCXX/qual-id-test.cpp
index 9994d75cac19d..61e60ae82dfa3 100644
--- a/test/SemaCXX/qual-id-test.cpp
+++ b/test/SemaCXX/qual-id-test.cpp
@@ -1,9 +1,15 @@
// 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
+
namespace A
{
namespace B
{
- struct base // expected-note{{object type}}
+ struct base
+#if __cplusplus <= 199711L
+ // expected-note@-2 {{lookup in the object type 'A::sub' refers here}}
+#endif
{
void x() {}
void y() {}
@@ -85,8 +91,14 @@ namespace C
void fun4a() {
A::sub *a;
- typedef A::member base; // expected-note{{current scope}}
- a->base::x(); // expected-error{{ambiguous}}
+ typedef A::member base;
+#if __cplusplus <= 199711L
+ // expected-note@-2 {{lookup from the current scope refers here}}
+#endif
+ a->base::x();
+#if __cplusplus <= 199711L
+ // expected-error@-2 {{lookup of 'base' in member access expression is ambiguous}}
+#endif
}
void fun4b() {