Debian Codegraph @

clang/test/CodeGenObjC/gnustep2-nontrivial-destructor-argument.mm

raw
1 // RUN: %clang_cc1 -triple x86_64-unknow-windows-msvc -emit-llvm -fobjc-runtime=gnustep-2.0 -o - %s
2
3 // Regression test. Ensure that C++ arguments with non-trivial destructors
4 // don't crash the compiler.
5
6 struct X
7 {
8 int a;
9 ~X();
10 };
11
12 @protocol Y
13 - (void)foo: (X)bar;
14 @end
15
16
17 void test(id<Y> obj)
18 {
19 X a{12};
20 [obj foo: a];
21 }
22