1 // Check that in case of copying an array of memcpy-able objects, their
2 // destructors will be called if an exception is thrown.
4 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fexceptions -fcxx-exceptions -O0 -fno-elide-constructors -emit-llvm %s -o - | FileCheck %s
8 ImplicitCopy() { x = 10; }
9 ~ImplicitCopy() { x = 20; }
14 ThrowCopy(const ThrowCopy &) { throw 1; }
26 // CHECK-NOT: call void @_ZN9ThrowCopyC1ERKS_
27 // CHECK: invoke void @_ZN9ThrowCopyC1ERKS_
28 // CHECK: invoke void @_ZN12ImplicitCopyD1Ev