summaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/writable-strings-deprecated.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/writable-strings-deprecated.cpp')
-rw-r--r--clang/test/SemaCXX/writable-strings-deprecated.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/writable-strings-deprecated.cpp b/clang/test/SemaCXX/writable-strings-deprecated.cpp
new file mode 100644
index 0000000..8295401
--- /dev/null
+++ b/clang/test/SemaCXX/writable-strings-deprecated.cpp
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -fsyntax-only -Wno-deprecated-writable-strings -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fwritable-strings -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wno-write-strings -verify %s
+// rdar://8827606
+
+char *fun(void)
+{
+ return "foo";
+}
+
+void test(bool b)
+{
+ ++b; // expected-warning {{incrementing expression of type bool is deprecated}}
+}