diff options
| author | Ted Kremenek <kremenek@apple.com> | 2010-08-27 21:34:58 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2010-08-27 21:34:58 +0000 |
| commit | ae9e2215133d89d28a03b79ff70da85868a50129 (patch) | |
| tree | e62d30baa1085d437a77d7f8fd9a3e983a1d351a /clang/include/clang-c | |
| parent | 2c2c5f3789a969fac1166a57164ab3cec5b9fcfa (diff) | |
| download | bcm5719-llvm-ae9e2215133d89d28a03b79ff70da85868a50129.tar.gz bcm5719-llvm-ae9e2215133d89d28a03b79ff70da85868a50129.zip | |
Implement CXCursor support for walking C++ base specifiers. This includes adding the API hooks clang_isVirtualBase() and clang_getCXXAccessSpecifier() to query properties of the base specifier.
Implements <rdar://problem/8274883>.
llvm-svn: 112296
Diffstat (limited to 'clang/include/clang-c')
| -rw-r--r-- | clang/include/clang-c/Index.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index 064bd21909b..3f0dabf1c5d 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -1001,7 +1001,8 @@ enum CXCursorKind { * referenced by the type of size is the typedef for size_type. */ CXCursor_TypeRef = 43, - CXCursor_LastRef = 43, + CXCursor_CXXBaseSpecifier = 44, + CXCursor_LastRef = CXCursor_CXXBaseSpecifier, /* Error conditions */ CXCursor_FirstInvalid = 70, @@ -1439,6 +1440,29 @@ CINDEX_LINKAGE CXType clang_getCursorResultType(CXCursor C); CINDEX_LINKAGE unsigned clang_isPODType(CXType T); /** + * \brief Returns 1 if the base class specified by the cursor with kind + * CX_CXXBaseSpecifier is virtual. + */ +CINDEX_LINKAGE unsigned clang_isVirtualBase(CXCursor); + +/** + * \brief Represents the C++ access control level to a base class for a + * cursor with kind CX_CXXBaseSpecifier. + */ +enum CX_CXXAccessSpecifier { + CX_CXXInvalidAccessSpecifier, + CX_CXXPublic, + CX_CXXProtected, + CX_CXXPrivate +}; + +/** + * \brief Returns the access control level for the C++ base specifier + * represented by a cursor with kind CX_CXXBaseSpecifier. + */ +CINDEX_LINKAGE enum CX_CXXAccessSpecifier clang_getCXXAccessSpecifier(CXCursor); + +/** * @} */ |

