summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-02-22 01:38:57 +0000
committerAnders Carlsson <andersca@mac.com>2009-02-22 01:38:57 +0000
commitd05f44b5ca40284f09fe418df711fd969ccaa23b (patch)
tree6ccb18e6660c93ed1d19c805972dca57888858a8 /clang/test/CodeGenObjC
parentf175ba1d17e7e6e38ad279dbc73acb3d75fb3f9f (diff)
downloadbcm5719-llvm-d05f44b5ca40284f09fe418df711fd969ccaa23b.tar.gz
bcm5719-llvm-d05f44b5ca40284f09fe418df711fd969ccaa23b.zip
Correctly encode incomplete and variable length arrays. Fixes PR3639.
llvm-svn: 65255
Diffstat (limited to 'clang/test/CodeGenObjC')
-rw-r--r--clang/test/CodeGenObjC/encode-test-3.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/encode-test-3.m b/clang/test/CodeGenObjC/encode-test-3.m
new file mode 100644
index 00000000000..8bd4421d6c1
--- /dev/null
+++ b/clang/test/CodeGenObjC/encode-test-3.m
@@ -0,0 +1,11 @@
+// RUN: clang -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s &&
+// RUN: grep -e "\^i" %t | count 1 &&
+// RUN: grep -e "\[0i\]" %t | count 1
+
+int main()
+{
+ int n;
+
+ const char * inc = @encode(int[]);
+ const char * vla = @encode(int[n]);
+}
OpenPOWER on IntegriCloud