diff options
author | George Karpenkov <ekarpenkov@apple.com> | 2018-12-06 22:06:59 +0000 |
---|---|---|
committer | George Karpenkov <ekarpenkov@apple.com> | 2018-12-06 22:06:59 +0000 |
commit | 53c578cc03b36b698961db7d6b6d50cee79bafa6 (patch) | |
tree | 9c9c3bbbd050d1502de35cbc27e21934c5166433 /lib/Sema/SemaDeclAttr.cpp | |
parent | af19f2060503a3835a454b6f6b50b22e1f619b15 (diff) | |
download | clang-53c578cc03b36b698961db7d6b6d50cee79bafa6.tar.gz |
[attributes] Add an attribute os_consumes_this, with similar semantics to ns_consumes_self
The attribute specifies that the call of the C++ method consumes a
reference to "this".
Differential Revision: https://reviews.llvm.org/D55155
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348532 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | lib/Sema/SemaDeclAttr.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index a2520c03cb..78374b8089 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -6408,6 +6408,9 @@ static void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, case ParsedAttr::AT_NSConsumesSelf: handleSimpleAttribute<NSConsumesSelfAttr>(S, D, AL); break; + case ParsedAttr::AT_OSConsumesThis: + handleSimpleAttribute<OSConsumesThisAttr>(S, D, AL); + break; case ParsedAttr::AT_NSReturnsAutoreleased: case ParsedAttr::AT_NSReturnsNotRetained: case ParsedAttr::AT_NSReturnsRetained: |