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
[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git]
/
clang
/
test
/
CodeGenObjC
/
gnustep2-nontrivial-destructor-argument.mm
blob
db27292db2031e11b57e59cfb0dc2c0181c53c7b
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