summaryrefslogtreecommitdiffstats
path: root/test/Sema/warn-write-strings.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/warn-write-strings.c')
-rw-r--r--test/Sema/warn-write-strings.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Sema/warn-write-strings.c b/test/Sema/warn-write-strings.c
new file mode 100644
index 0000000..938f0be
--- /dev/null
+++ b/test/Sema/warn-write-strings.c
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -verify -fsyntax-only -Wwrite-strings %s
+
+// PR4804
+char* x = "foo"; // expected-warning {{initializing 'char const [4]' discards qualifiers, expected 'char *'}}
OpenPOWER on IntegriCloud