summaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/access-control-check.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/access-control-check.cpp')
-rw-r--r--clang/test/SemaCXX/access-control-check.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/access-control-check.cpp b/clang/test/SemaCXX/access-control-check.cpp
new file mode 100644
index 0000000..4540e99
--- /dev/null
+++ b/clang/test/SemaCXX/access-control-check.cpp
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+class M {
+ int iM;
+};
+
+class P {
+ int iP; // expected-note {{declared private here}}
+ int PPR(); // expected-note {{declared private here}}
+};
+
+class N : M,P {
+ N() {}
+ int PR() { return iP + PPR(); } // expected-error 2 {{private member of 'P'}}
+};