summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC/encode-test.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenObjC/encode-test.m')
-rw-r--r--clang/test/CodeGenObjC/encode-test.m40
1 files changed, 39 insertions, 1 deletions
diff --git a/clang/test/CodeGenObjC/encode-test.m b/clang/test/CodeGenObjC/encode-test.m
index f5b6b920711..982faf03bad 100644
--- a/clang/test/CodeGenObjC/encode-test.m
+++ b/clang/test/CodeGenObjC/encode-test.m
@@ -1,5 +1,6 @@
// RUN: clang -fnext-runtime -emit-llvm -o %t %s &&
-// RUN: grep -e "\^{Innermost=CC}" %t | count 1
+// RUN: grep -e "\^{Innermost=CC}" %t | count 1 &&
+// RUN: grep -e "{Derived=#ib32b8b3b8sb16b8b8b2b8ccb6}" %t | count 1
@class Int1;
@@ -15,3 +16,40 @@ struct Innermost {
@implementation Int1
@end
+
+@interface Base
+{
+ struct objc_class *isa;
+ int full;
+ int full2: 32;
+ int _refs: 8;
+ int field2: 3;
+ unsigned f3: 8;
+ short cc;
+ unsigned g: 16;
+ int r2: 8;
+ int r3: 8;
+ int r4: 2;
+ int r5: 8;
+ char c;
+}
+@end
+
+@interface Derived: Base
+{
+ char d;
+ int _field3: 6;
+}
+@end
+
+@implementation Base
+@end
+
+@implementation Derived
+@end
+
+int main()
+{
+ const char *en = @encode(Derived);
+}
+
OpenPOWER on IntegriCloud