diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2015-10-09 13:53:24 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2015-10-09 13:53:24 +0000 |
| commit | 6269236a8ee11c973a9b14b299677c0509002c27 (patch) | |
| tree | 3bf0fa449d41d280ccd35b414e5c8bdf80d3c7c0 /clang/test/Sema/attr-ownership.c | |
| parent | 49692eda7e34aecb3c67396e75659ee68649cabe (diff) | |
| download | bcm5719-llvm-6269236a8ee11c973a9b14b299677c0509002c27.tar.gz bcm5719-llvm-6269236a8ee11c973a9b14b299677c0509002c27.zip | |
Amending r249721 to properly handle pathological attribute-related names like __ and ____.
Patch by Adrian Zgorzalek!
llvm-svn: 249833
Diffstat (limited to 'clang/test/Sema/attr-ownership.c')
| -rw-r--r-- | clang/test/Sema/attr-ownership.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/test/Sema/attr-ownership.c b/clang/test/Sema/attr-ownership.c index d2e48c65a23..c76f78914b5 100644 --- a/clang/test/Sema/attr-ownership.c +++ b/clang/test/Sema/attr-ownership.c @@ -19,6 +19,7 @@ void f13(int *i, int *j) __attribute__((ownership_holds(foo, 1))) __attribute__( void f14(int i, int j, int *k) __attribute__((ownership_holds(foo, 3))) __attribute__((ownership_takes(foo, 3))); // expected-error {{'ownership_holds' and 'ownership_takes' attributes are not compatible}} void f15(int, int) - __attribute__((ownership_returns(foo, 1))) // expected-note {{declared with index 1 here}} - __attribute__((ownership_returns(foo, 2))); // expected-error {{'ownership_returns' attribute index does not match; here it is 2}} -void f16(int *i, int *j) __attribute__((ownership_holds(foo, 1))) __attribute__((ownership_holds(foo, 1))); // OK, same index + __attribute__((ownership_returns(foo, 1))) // expected-note {{declared with index 1 here}}
+ __attribute__((ownership_returns(foo, 2))); // expected-error {{'ownership_returns' attribute index does not match; here it is 2}}
+void f16(int *i, int *j) __attribute__((ownership_holds(foo, 1))) __attribute__((ownership_holds(foo, 1))); // OK, same index
+void f17(void*) __attribute__((ownership_takes(__, 1)));
|

