repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git]
/
clang
/
test
/
CodeGenObjC
/
gnustep2-nontrivial-destructor-argument.mm
blob
a7de79bf79940b997941db957cd10a1aa9f35b29
1
// RUN: %clang_cc1 -triple x86_64-unknow-windows-msvc -S -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