diff options
author | Dave Lee <davelee.com@gmail.com> | 2017-10-26 15:53:37 +0000 |
---|---|---|
committer | Dave Lee <davelee.com@gmail.com> | 2017-10-26 15:53:37 +0000 |
commit | c9d23a99f00d5e84f1e05d2903ef7538a4d4c33a (patch) | |
tree | 74ea88e63e675c90092c365580bd073234d81fd7 /include/clang | |
parent | 5f17d5ca46b48156b96f81e7c32d381a0ca65b41 (diff) |
Add objcCategoryImplDecl matcher
Summary:
Add `objcCategoryImplDecl` which matches ObjC category definitions
(`@implementation`). This matcher complements `objcCategoryDecl` (`@interface`)
which was added in D30854.
Reviewers: aaron.ballman, malcolm.parsons, alexshap
Reviewed By: aaron.ballman
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D39293
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316670 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/ASTMatchers/ASTMatchers.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/clang/ASTMatchers/ASTMatchers.h b/include/clang/ASTMatchers/ASTMatchers.h index 2b03bb362b..766e95cdde 100644 --- a/include/clang/ASTMatchers/ASTMatchers.h +++ b/include/clang/ASTMatchers/ASTMatchers.h @@ -1178,6 +1178,17 @@ const internal::VariadicDynCastAllOfMatcher< Decl, ObjCCategoryDecl> objcCategoryDecl; +/// \brief Matches Objective-C category definitions. +/// +/// Example matches Foo (Additions) +/// \code +/// @implementation Foo (Additions) +/// @end +/// \endcode +const internal::VariadicDynCastAllOfMatcher< + Decl, + ObjCCategoryImplDecl> objcCategoryImplDecl; + /// \brief Matches Objective-C method declarations. /// /// Example matches both declaration and definition of -[Foo method] |