mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-15 15:33:56 +00:00
[attributes] Add more tests for os_returns_retained
llvm-svn: 348443
This commit is contained in:
parent
ad7ac964e5
commit
0cd6b9b9f7
@ -1,6 +1,4 @@
|
||||
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
||||
|
||||
// expected-no-diagnostics
|
||||
// RUN: %clang_cc1 -fsyntax-only -verify -fblocks %s
|
||||
|
||||
struct S {};
|
||||
|
||||
@ -9,3 +7,9 @@ struct S {};
|
||||
- (S*) generateS __attribute__((os_returns_retained));
|
||||
- (void) takeS:(S*) __attribute__((os_consumed)) s;
|
||||
@end
|
||||
|
||||
typedef __attribute__((os_returns_retained)) id (^blockType)(); // expected-warning{{'os_returns_retained' attribute only applies to functions, Objective-C methods, and Objective-C properties}}
|
||||
|
||||
__auto_type b = ^ id (id filter) __attribute__((os_returns_retained)) { // expected-warning{{'os_returns_retained' attribute only applies to functions, Objective-C methods, and Objective-C properties}}
|
||||
return filter;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user