summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC/Inputs
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2018-03-13 23:37:51 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2018-03-13 23:37:51 +0000
commitceb66521ba155ad250e54f8142a2034af7ab3210 (patch)
tree48073dd3e6c896d6e4c9e6f9a704b31ebff30c76 /clang/test/CodeGenObjC/Inputs
parent48ffd5cc6e5bb1daef34ffefbc919a05c5e1f925 (diff)
downloadbcm5719-llvm-ceb66521ba155ad250e54f8142a2034af7ab3210.tar.gz
bcm5719-llvm-ceb66521ba155ad250e54f8142a2034af7ab3210.zip
Check that a field is not annotated with attribute "unavailable" before
setting the NonTrivialToPrimitive* flags of a record. Union fields that have non-trivial Objective-C ownership qualifications are normally not legal, but if the union is declared in a system header, the fields are annotated with attribute "unavailable". rdar://problem/38431072 llvm-svn: 327464
Diffstat (limited to 'clang/test/CodeGenObjC/Inputs')
-rw-r--r--clang/test/CodeGenObjC/Inputs/strong_in_union.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/Inputs/strong_in_union.h b/clang/test/CodeGenObjC/Inputs/strong_in_union.h
new file mode 100644
index 00000000000..abe4549055c
--- /dev/null
+++ b/clang/test/CodeGenObjC/Inputs/strong_in_union.h
@@ -0,0 +1,10 @@
+#ifndef STRONG_IN_UNION_H
+#define STRONG_IN_UNION_H
+#pragma clang system_header
+
+typedef union {
+ id f0;
+ int *f1;
+} U;
+
+#endif // STRONG_IN_UNION_H
OpenPOWER on IntegriCloud