summaryrefslogtreecommitdiffstats
path: root/test/CodeGenObjCXX/ivar-objects.mm
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenObjCXX/ivar-objects.mm')
-rw-r--r--test/CodeGenObjCXX/ivar-objects.mm18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGenObjCXX/ivar-objects.mm b/test/CodeGenObjCXX/ivar-objects.mm
index d0432ed..d05763b 100644
--- a/test/CodeGenObjCXX/ivar-objects.mm
+++ b/test/CodeGenObjCXX/ivar-objects.mm
@@ -1,6 +1,10 @@
// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
// CHECK: -[A .cxx_construct]
// CHECK: -[A .cxx_destruct]
+// CHECK: -[B .cxx_construct]
+// CHECK-NOT: -[B .cxx_destruct]
+// CHECK-NOT: -[C .cxx_construct]
+// CHECK: -[C .cxx_destruct]
@interface NSObject
- alloc;
@@ -84,3 +88,17 @@ public:
@implementation I
@synthesize position;
@end
+
+// This class should have a .cxx_construct but no .cxx_destruct.
+namespace test3 { struct S { S(); }; }
+@implementation B {
+ test3::S s;
+}
+@end
+
+// This class should have a .cxx_destruct but no .cxx_construct.
+namespace test4 { struct S { ~S(); }; }
+@implementation C {
+ test4::S s;
+}
+@end
OpenPOWER on IntegriCloud