xref: /aosp_15_r20/external/clang/test/SemaObjCXX/microsoft-abi-byval.mm (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li// RUN: %clang_cc1 -fsyntax-only -verify -triple %ms_abi_triple -Wno-objc-root-class %s
2*67e74705SXin Li// expected-no-diagnostics
3*67e74705SXin Li
4*67e74705SXin Liclass Foo {
5*67e74705SXin Li  ~Foo();
6*67e74705SXin Li};
7*67e74705SXin Li
8*67e74705SXin Li@interface bar
9*67e74705SXin Li- (void) my_method: (Foo)arg;
10*67e74705SXin Li@end
11*67e74705SXin Li
12*67e74705SXin Li@implementation bar
13*67e74705SXin Li- (void) my_method: (Foo)arg { // no error; MS ABI will call Foo's dtor, but we skip the access check.
14*67e74705SXin Li}
15*67e74705SXin Li@end
16