summaryrefslogtreecommitdiffstats
path: root/clang/tools/c-index-test
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-04-18 22:15:49 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-04-18 22:15:49 +0000
commit9adfd8aabbdbe7ce06663c98d3c5e8eda29e6ed1 (patch)
treebee78fe3be48ff7052fd0f6e308715328b20e160 /clang/tools/c-index-test
parent82656cb200b1cf91a95b16a14676ce81bddc890b (diff)
downloadbcm5719-llvm-9adfd8aabbdbe7ce06663c98d3c5e8eda29e6ed1.tar.gz
bcm5719-llvm-9adfd8aabbdbe7ce06663c98d3c5e8eda29e6ed1.zip
[libclang] Introduce clang_Cursor_getObjCPropertyAttributes to query the written attributes in a property declaration.
rdar://13684512 llvm-svn: 179803
Diffstat (limited to 'clang/tools/c-index-test')
-rw-r--r--clang/tools/c-index-test/c-index-test.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c
index b77c88de58f..ab022a9d988 100644
--- a/clang/tools/c-index-test/c-index-test.c
+++ b/clang/tools/c-index-test/c-index-test.c
@@ -787,6 +787,28 @@ static void PrintCursor(CXCursor Cursor,
}
PrintCursorComments(Cursor, ValidationData);
+
+ {
+ unsigned PropAttrs = clang_Cursor_getObjCPropertyAttributes(Cursor, 0);
+ if (PropAttrs != CXObjCPropertyAttr_noattr) {
+ printf(" [");
+ #define PRINT_PROP_ATTR(A) \
+ if (PropAttrs & CXObjCPropertyAttr_##A) printf(#A ",")
+ PRINT_PROP_ATTR(readonly);
+ PRINT_PROP_ATTR(getter);
+ PRINT_PROP_ATTR(assign);
+ PRINT_PROP_ATTR(readwrite);
+ PRINT_PROP_ATTR(retain);
+ PRINT_PROP_ATTR(copy);
+ PRINT_PROP_ATTR(nonatomic);
+ PRINT_PROP_ATTR(setter);
+ PRINT_PROP_ATTR(atomic);
+ PRINT_PROP_ATTR(weak);
+ PRINT_PROP_ATTR(strong);
+ PRINT_PROP_ATTR(unsafe_unretained);
+ printf("]");
+ }
+ }
}
}
OpenPOWER on IntegriCloud