diff options
Diffstat (limited to 'test/Sema/attr-ownership.cpp')
-rw-r--r-- | test/Sema/attr-ownership.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Sema/attr-ownership.cpp b/test/Sema/attr-ownership.cpp new file mode 100644 index 0000000000000..cde195ff0aa89 --- /dev/null +++ b/test/Sema/attr-ownership.cpp @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 %s -verify -fsyntax-only + +class C { + void f(int, int) + __attribute__((ownership_returns(foo, 2))) // expected-note {{declared with index 2 here}} + __attribute__((ownership_returns(foo, 3))); // expected-error {{'ownership_returns' attribute index does not match; here it is 3}} +}; |