summaryrefslogtreecommitdiffstats
path: root/include/clang/ASTMatchers
diff options
context:
space:
mode:
authorHaojian Wu <hokein@google.com>2016-06-30 07:50:01 +0000
committerHaojian Wu <hokein@google.com>2016-06-30 07:50:01 +0000
commitaa6f7e6671996c85b2b8a7651c62928330f428b2 (patch)
treebf534e76f03d4d554e7e29d4fa66e02db2daf7fc /include/clang/ASTMatchers
parentce1f307b91f539c75b14cdbcd48ea0cc3218e8fb (diff)
[ASTMatcher] Add a node matcher for EnumType.
Reviewers: aaron.ballman Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D21860 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274217 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/ASTMatchers')
-rw-r--r--include/clang/ASTMatchers/ASTMatchers.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/clang/ASTMatchers/ASTMatchers.h b/include/clang/ASTMatchers/ASTMatchers.h
index c7d10859a5..23d2f84f67 100644
--- a/include/clang/ASTMatchers/ASTMatchers.h
+++ b/include/clang/ASTMatchers/ASTMatchers.h
@@ -4654,6 +4654,21 @@ AST_TYPELOC_TRAVERSE_MATCHER(pointee, getPointee,
/// matches "typedef int X"
AST_TYPE_MATCHER(TypedefType, typedefType);
+/// \brief Matches enum types.
+///
+/// Given
+/// \code
+/// enum C { Green };
+/// enum class S { Red };
+///
+/// C c;
+/// S s;
+/// \endcode
+//
+/// \c enumType() matches the type of the variable declarations of both \c c and
+/// \c s.
+AST_TYPE_MATCHER(EnumType, enumType);
+
/// \brief Matches template specialization types.
///
/// Given