summaryrefslogtreecommitdiffstats
path: root/clang/tools/c-index-test/c-index-test.c
diff options
context:
space:
mode:
authorJonathan Coe <jbcoe@me.com>2016-04-27 12:48:25 +0000
committerJonathan Coe <jbcoe@me.com>2016-04-27 12:48:25 +0000
commit2956535b7c44fb4cf742667ec4b61cf176f9d32d (patch)
tree2e5cb14efb2deae8228fa30d6b554473b8262969 /clang/tools/c-index-test/c-index-test.c
parent7ac9628648c6ba72114d08c9669f00422f328533 (diff)
downloadbcm5719-llvm-2956535b7c44fb4cf742667ec4b61cf176f9d32d.tar.gz
bcm5719-llvm-2956535b7c44fb4cf742667ec4b61cf176f9d32d.zip
Expose cxx constructor and method properties through libclang and python bindings.
Summary: I have exposed the following function through libclang and the clang.cindex python bindings: clang_CXXConstructor_isConvertingConstructor, clang_CXXConstructor_isCopyConstructor, clang_CXXConstructor_isDefaultConstructor, clang_CXXConstructor_isMoveConstructor, clang_CXXMethod_isDefaulted I need (some of) these methods for a C++ code model I am building in Python to drive a code generator. Reviewers: compnerd, skalinichev Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15469 llvm-svn: 267706
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r--clang/tools/c-index-test/c-index-test.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c
index b3105fb87c1..d0fe84aa08a 100644
--- a/clang/tools/c-index-test/c-index-test.c
+++ b/clang/tools/c-index-test/c-index-test.c
@@ -772,9 +772,20 @@ static void PrintCursor(CXCursor Cursor, const char *CommentSchemaFile) {
clang_disposeString(DeprecatedMessage);
clang_disposeString(UnavailableMessage);
-
+
+ if (clang_CXXConstructor_isDefaultConstructor(Cursor))
+ printf(" (default constructor)");
+
+ if (clang_CXXConstructor_isMoveConstructor(Cursor))
+ printf(" (move constructor)");
+ if (clang_CXXConstructor_isCopyConstructor(Cursor))
+ printf(" (copy constructor)");
+ if (clang_CXXConstructor_isConvertingConstructor(Cursor))
+ printf(" (converting constructor)");
if (clang_CXXField_isMutable(Cursor))
printf(" (mutable)");
+ if (clang_CXXMethod_isDefaulted(Cursor))
+ printf(" (defaulted)");
if (clang_CXXMethod_isStatic(Cursor))
printf(" (static)");
if (clang_CXXMethod_isVirtual(Cursor))
OpenPOWER on IntegriCloud