summaryrefslogtreecommitdiffstats
path: root/clang/include/clang-c
diff options
context:
space:
mode:
authorMichael Wu <mwu.code@gmail.com>2018-08-03 04:21:25 +0000
committerMichael Wu <mwu.code@gmail.com>2018-08-03 04:21:25 +0000
commit153085d6bc7c15e059a32f8223479a8e35d82ee5 (patch)
tree4923e4b891adc278bc2f59e19af8914560f4bfb0 /clang/include/clang-c
parentced99b99d1b3bf495b12d2c7e951c6ed985d0364 (diff)
downloadbcm5719-llvm-153085d6bc7c15e059a32f8223479a8e35d82ee5.tar.gz
bcm5719-llvm-153085d6bc7c15e059a32f8223479a8e35d82ee5.zip
[libclang 3/8] Add support for AttributedType
Summary: This patch adds support to the libclang API for identifying AttributedTypes in CXTypes and reading the modified type that the type points to. Currently AttributedTypes are skipped. This patch continues to skip AttributedTypes by default, but adds a parsing option to CXTranslationUnit to include AttributedTypes. This patch depends on D49066 since it also adds a CXType. Testing will be added in another patch which depends on this one. Reviewers: yvvan, jbcoe Reviewed By: yvvan Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49081 llvm-svn: 338808
Diffstat (limited to 'clang/include/clang-c')
-rw-r--r--clang/include/clang-c/Index.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h
index 572d24acb24..8e281cab910 100644
--- a/clang/include/clang-c/Index.h
+++ b/clang/include/clang-c/Index.h
@@ -1331,7 +1331,12 @@ enum CXTranslationUnit_Flags {
*
* The function bodies of the main file are not skipped.
*/
- CXTranslationUnit_LimitSkipFunctionBodiesToPreamble = 0x800
+ CXTranslationUnit_LimitSkipFunctionBodiesToPreamble = 0x800,
+
+ /**
+ * Used to indicate that attributed types should be included in CXType.
+ */
+ CXTranslationUnit_IncludeAttributedTypes = 0x1000
};
/**
@@ -3268,7 +3273,8 @@ enum CXTypeKind {
CXType_OCLReserveID = 160,
CXType_ObjCObject = 161,
- CXType_ObjCTypeParam = 162
+ CXType_ObjCTypeParam = 162,
+ CXType_Attributed = 163
};
/**
@@ -3818,6 +3824,13 @@ CINDEX_LINKAGE long long clang_Type_getSizeOf(CXType T);
CINDEX_LINKAGE long long clang_Type_getOffsetOf(CXType T, const char *S);
/**
+ * Return the type that was modified by this attributed type.
+ *
+ * If the type is not an attributed type, an invalid type is returned.
+ */
+CINDEX_LINKAGE CXType clang_Type_getModifiedType(CXType T);
+
+/**
* Return the offset of the field represented by the Cursor.
*
* If the cursor is not a field declaration, -1 is returned.
OpenPOWER on IntegriCloud