]> granicus.if.org Git - clang/commitdiff
Add test for initializing array with string literal.
authorZhongxing Xu <xuzhongxing@gmail.com>
Sun, 30 Nov 2008 05:51:19 +0000 (05:51 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Sun, 30 Nov 2008 05:51:19 +0000 (05:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60281 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/array-struct.c

index 38e489e2a23f38374da627fb9f17769097960ab5..139ee3ee25b8dd00b00e78d48b24a73cf927a296 100644 (file)
@@ -78,3 +78,10 @@ void f8() {
 void f9() {
   struct s a[10];
 }
+
+// Initializing array with string literal.
+void f10() {
+  char a1[4] = "abc";
+  char a2[2] = "abc";
+  char a3[6] = "abc";
+}