summaryrefslogtreecommitdiff
path: root/test/Sema/cxx-as-c.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/cxx-as-c.c')
-rw-r--r--test/Sema/cxx-as-c.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Sema/cxx-as-c.c b/test/Sema/cxx-as-c.c
new file mode 100644
index 0000000000..41d7350d1f
--- /dev/null
+++ b/test/Sema/cxx-as-c.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 %s -verify
+
+// PR36157
+struct Foo {
+ Foo(int n) : n_(n) {} // expected-error 1+{{}} expected-warning 1+{{}}
+private:
+ int n;
+};
+int main() { Foo f; } // expected-error 1+{{}}