summaryrefslogtreecommitdiffstats
path: root/test/CXX/class
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/class')
-rw-r--r--test/CXX/class/class.friend/p6.cpp4
-rw-r--r--test/CXX/class/class.nested.type/p1.cpp8
2 files changed, 8 insertions, 4 deletions
diff --git a/test/CXX/class/class.friend/p6.cpp b/test/CXX/class/class.friend/p6.cpp
index 82ca50e..e4c59f7 100644
--- a/test/CXX/class/class.friend/p6.cpp
+++ b/test/CXX/class/class.friend/p6.cpp
@@ -4,7 +4,11 @@
class A {
friend static class B; // expected-error {{'static' is invalid in friend declarations}}
friend extern class C; // expected-error {{'extern' is invalid in friend declarations}}
+#if __cplusplus < 201103L
+ friend register class E; // expected-error {{'register' is invalid in friend declarations}}
+#else
friend register class E; // expected-error {{'register' is invalid in friend declarations}}
+#endif
friend mutable class F; // expected-error {{'mutable' is invalid in friend declarations}}
friend typedef class G; // expected-error {{'typedef' is invalid in friend declarations}}
friend __thread class G; // expected-error {{'__thread' is invalid in friend declarations}}
diff --git a/test/CXX/class/class.nested.type/p1.cpp b/test/CXX/class/class.nested.type/p1.cpp
index 4a04a44..9295654 100644
--- a/test/CXX/class/class.nested.type/p1.cpp
+++ b/test/CXX/class/class.nested.type/p1.cpp
@@ -2,12 +2,12 @@
class X {
public:
- typedef int I;
- class Y { };
+ typedef int I; // expected-note{{'X::I' declared here}}
+ class Y { }; // expected-note{{'X::Y' declared here}}
I a;
};
-I b; // expected-error{{unknown type name 'I'}}
-Y c; // expected-error{{unknown type name 'Y'}}
+I b; // expected-error{{unknown type name 'I'; did you mean 'X::I'?}}
+Y c; // expected-error{{unknown type name 'Y'; did you mean 'X::Y'?}}
X::Y d;
X::I e;
OpenPOWER on IntegriCloud