summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/attr-ownership.cpp
blob: 7381285e2da488767f09a7514c70f02e6ca4333d (plain)
1
2
3
4
5
6
7
// RUN: %clang_cc1 %s -verify -fsyntax-only

class C {
  void f(int, int)
      __attribute__((ownership_returns(foo, 2)))  // expected-error {{'ownership_returns' attribute index does not match; here it is 2}}
      __attribute__((ownership_returns(foo, 3))); // expected-note {{declared with index 3 here}}
};
OpenPOWER on IntegriCloud