[PATCH] D49063: [libclang] Add support for ObjCObjectType

Michael Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 12 08:30:39 PDT 2018


michaelwu added inline comments.


================
Comment at: include/clang-c/Index.h:35
 #define CINDEX_VERSION_MAJOR 0
 #define CINDEX_VERSION_MINOR 49
 
----------------
yvvan wrote:
> Please, increment the minor version (you are adding new functions)
This is one in a series of patches that add features to libclang - would you be ok with incrementing at the end of the series?


================
Comment at: include/clang-c/Index.h:3644
+ */
+CINDEX_LINKAGE int clang_Type_getNumObjCProtocolRefs(CXType T);
+
----------------
yvvan wrote:
> Other similar calls usually return unsigned int because they can't be below zero.
I was mimicking `clang_Type_getNumTemplateArguments` for this, which appears to be the most similar API. It uses 0 to n for the number of template arguments and -1 to indicate that it was called on the wrong type.  If you're ok with the inconsistency, I'll make this unsigned. I also prefer having this unsigned.


https://reviews.llvm.org/D49063





More information about the cfe-commits mailing list