// RUN: %clang_cc1 -fsyntax-only -verify %s

// expected-no-diagnostics

struct S {};

@interface I
  @property (readonly) S* prop __attribute__((os_returns_retained));
  - (S*) generateS __attribute__((os_returns_retained));
  - (void) takeS:(S*) __attribute__((os_consumed)) s;
@end

// RUN: %clang_cc1 -fsyntax-only -verify -fblocks %s

struct S {};

@interface I
  @property (readonly) S* prop __attribute__((os_returns_retained));
  - (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;
};

Add more tests for os_returns_retained
[attributes] Add more tests for os_returns_retained

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@348443 91177308-0d34-0410-b5e6-96231b3b80d8
