aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC/block-literal-with-attribute.m
blob: 2a8057927ee572aabe541c3475d7274faf30ac62 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: %clang_cc1 -fsyntax-only %s -verify -fblocks -fobjc-arc
// RUN: %clang_cc1 -fsyntax-only %s -verify -fblocks

__auto_type block = ^ id __attribute__((ns_returns_retained)) (id filter) {
  return filter; // ok
};
__auto_type block2 = ^  __attribute__((ns_returns_retained)) id (id filter) {
  return filter; // ok
};
__auto_type block3 = ^ id (id filter)  __attribute__((ns_returns_retained))  {
  return filter; // ok
};

// expected-no-diagnostics