[PATCH] D27909: Add a lite test for PR31374

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 18 18:42:03 PST 2016


yaxunl created this revision.
yaxunl added a reviewer: thakis.
yaxunl added a subscriber: cfe-commits.

https://reviews.llvm.org/D27909

Files:
  test/CodeGenObjC/nullptr-assert.m


Index: test/CodeGenObjC/nullptr-assert.m
===================================================================
--- /dev/null
+++ test/CodeGenObjC/nullptr-assert.m
@@ -0,0 +1,25 @@
+// RUN: %clang_cc1 -Wno-objc-root-class -triple x86_64-- -emit-llvm -o - %s
+// REQUIRES: asserts
+// Verify there is no assertion.
+
+ at interface A
+ at end
+
+extern A *a;
+
+ at protocol X
+ at end
+
+ at interface X
+ at end
+
+ at implementation X
+
+-(void)test {
+  struct S {
+    A *a;
+    int b;
+  };
+  struct S s[] = {{a, 0}, {(void *)0, 0}};
+}
+ at end


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27909.81907.patch
Type: text/x-patch
Size: 526 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161219/a8b44ae8/attachment.bin>


More information about the cfe-commits mailing list