Lines Matching refs:Cursor
601 static void PrintCursorComments(CXCursor Cursor,
609 RawComment = clang_Cursor_getRawCommentText(Cursor);
613 PrintRange(clang_Cursor_getCommentRange(Cursor), "RawCommentRange");
615 BriefComment = clang_Cursor_getBriefCommentText(Cursor);
625 CXComment Comment = clang_Cursor_getParsedComment(Cursor);
655 static void PrintCursor(CXCursor Cursor, const char *CommentSchemaFile) {
656 CXTranslationUnit TU = clang_Cursor_getTranslationUnit(Cursor);
657 if (clang_isInvalid(Cursor.kind)) {
658 CXString ks = clang_getCursorKindSpelling(Cursor.kind);
659 printf("Invalid Cursor => %s", clang_getCString(ks));
680 ks = clang_getCursorKindSpelling(Cursor.kind);
681 string = want_display_name? clang_getCursorDisplayName(Cursor)
682 : clang_getCursorSpelling(Cursor);
688 Referenced = clang_getCursorReferenced(Cursor);
711 if (clang_isCursorDefinition(Cursor))
714 switch (clang_getCursorAvailability(Cursor)) {
732 = clang_getCursorPlatformAvailability(Cursor,
772 if (clang_CXXField_isMutable(Cursor))
774 if (clang_CXXMethod_isStatic(Cursor))
776 if (clang_CXXMethod_isVirtual(Cursor))
778 if (clang_CXXMethod_isConst(Cursor))
780 if (clang_CXXMethod_isPureVirtual(Cursor))
782 if (clang_Cursor_isVariadic(Cursor))
784 if (clang_Cursor_isObjCOptional(Cursor))
787 if (Cursor.kind == CXCursor_IBOutletCollectionAttr) {
789 clang_getCanonicalType(clang_getIBOutletCollectionType(Cursor));
795 if (Cursor.kind == CXCursor_CXXBaseSpecifier) {
796 enum CX_CXXAccessSpecifier access = clang_getCXXAccessSpecifier(Cursor);
797 unsigned isVirtual = clang_isVirtualBase(Cursor);
815 SpecializationOf = clang_getSpecializedCursorTemplate(Cursor);
824 if (Cursor.kind == CXCursor_FunctionDecl) {
826 unsigned NumTemplateArgs = clang_Cursor_getNumTemplateArguments(Cursor);
830 clang_Cursor_getTemplateArgumentKind(Cursor, I);
834 CXType T = clang_Cursor_getTemplateArgumentType(Cursor, I);
843 I, TAK, clang_Cursor_getTemplateArgumentValue(Cursor, I));
852 clang_getOverriddenCursors(Cursor, &overridden, &num_overridden);
875 if (Cursor.kind == CXCursor_InclusionDirective) {
876 CXFile File = clang_getIncludedFile(Cursor);
885 CursorExtent = clang_getCursorExtent(Cursor);
886 RefNameRange = clang_getCursorReferenceNameRange(Cursor,
895 RefNameRange = clang_getCursorReferenceNameRange(Cursor,
905 PrintCursorComments(Cursor, CommentSchemaFile);
908 unsigned PropAttrs = clang_Cursor_getObjCPropertyAttributes(Cursor, 0);
930 unsigned QT = clang_Cursor_getObjCDeclQualifiers(Cursor);
947 static const char* GetCursorSource(CXCursor Cursor) {
948 CXSourceLocation Loc = clang_getCursorLocation(Cursor);
1078 enum CXChildVisitResult FilteredPrintingVisitor(CXCursor Cursor,
1082 if (!Data->Filter || (Cursor.kind == *(enum CXCursorKind *)Data->Filter)) {
1083 CXSourceLocation Loc = clang_getCursorLocation(Cursor);
1087 GetCursorSource(Cursor), line, column);
1088 PrintCursor(Cursor, Data->CommentSchemaFile);
1089 PrintCursorExtent(Cursor);
1090 if (clang_isDeclaration(Cursor.kind)) {
1091 enum CX_CXXAccessSpecifier access = clang_getCXXAccessSpecifier(Cursor);
1114 static enum CXChildVisitResult FunctionScanVisitor(CXCursor Cursor,
1122 if (Cursor.kind != CXCursor_FunctionDecl ||
1123 !clang_isCursorDefinition(Cursor))
1126 clang_getDefinitionSpellingAndExtent(Cursor, &startBuf, &endBuf,
1145 Loc = clang_getCursorLocation(Cursor);
1229 static enum CXChildVisitResult PrintLinkage(CXCursor cursor, CXCursor p,
1233 if (clang_isInvalid(clang_getCursorKind(cursor)))
1236 switch (clang_getCursorLinkage(cursor)) {
1245 PrintCursor(cursor, NULL);
1256 static enum CXChildVisitResult PrintVisibility(CXCursor cursor, CXCursor p,
1260 if (clang_isInvalid(clang_getCursorKind(cursor)))
1263 switch (clang_getCursorVisibility(cursor)) {
1271 PrintCursor(cursor, NULL);
1300 static enum CXChildVisitResult PrintType(CXCursor cursor, CXCursor p,
1302 if (!clang_isInvalid(clang_getCursorKind(cursor))) {
1303 CXType T = clang_getCursorType(cursor);
1305 PrintCursor(cursor, NULL);
1326 CXType RT = clang_getCursorResultType(cursor);
1333 int NumArgs = clang_Cursor_getNumArguments(cursor);
1338 CXType T = clang_getCursorType(clang_Cursor_getArgument(cursor, i));
1379 unsigned isAnon = clang_Cursor_isAnonymous(cursor);
1392 static enum CXChildVisitResult PrintTypeSize(CXCursor cursor, CXCursor p,
1395 enum CXCursorKind K = clang_getCursorKind(cursor);
1398 T = clang_getCursorType(cursor);
1399 PrintCursor(cursor, NULL);
1417 CXString FieldSpelling = clang_getCursorSpelling(cursor);
1422 if (clang_getCursorKind(cursor) == CXCursor_FieldDecl) {
1435 long long Offset2 = clang_Cursor_getOffsetOfField(cursor);
1448 int IsBitfield = clang_Cursor_isBitField(cursor);
1450 printf(" [BitFieldSize=%d]", clang_getFieldDeclBitWidth(cursor));
1460 static enum CXChildVisitResult PrintMangledName(CXCursor cursor, CXCursor p,
1463 if (clang_isUnexposed(clang_getCursorKind(cursor)))
1465 PrintCursor(cursor, NULL);
1466 cursor);
1472 static enum CXChildVisitResult PrintManglings(CXCursor cursor, CXCursor p,
1476 if (clang_isUnexposed(clang_getCursorKind(cursor)))
1478 if (!clang_isDeclaration(clang_getCursorKind(cursor)))
1480 if (clang_getCursorKind(cursor) == CXCursor_ParmDecl)
1482 PrintCursor(cursor, NULL);
1483 Manglings = clang_Cursor_getCXXManglings(cursor);
1495 static enum CXChildVisitResult PrintBitWidth(CXCursor cursor, CXCursor p,
1498 if (clang_getCursorKind(cursor) != CXCursor_FieldDecl)
1501 Bitwidth = clang_getFieldDeclBitWidth(cursor);
1503 PrintCursor(cursor, NULL);
1724 static void print_cursor_file_scan(CXTranslationUnit TU, CXCursor cursor,
1733 PrintCursor(cursor, NULL);
1764 CXCursor cursor;
1773 /* Check the cursor at this position, and dump the previous one if we have
1776 cursor = clang_getCursor(TU, clang_getLocation(TU, file, line, col));
1777 if ((c == EOF || !clang_equalCursors(cursor, prevCursor)) &&
1787 prevCursor = cursor;
2260 CXCursor Cursor;
2267 while (strstr(argv[NumLocations+1], "-cursor-at=") == argv[NumLocations+1])
2275 const char *input = argv[Loc + 1] + strlen("-cursor-at=");
2326 Cursor = clang_getCursor(TU,
2335 Cursor);
2336 CXSourceLocation CursorLoc = clang_getCursorLocation(Cursor);
2342 PrintCursor(Cursor, NULL);
2343 PrintCursorExtent(Cursor);
2344 Spelling = clang_getCursorSpelling(Cursor);
2351 clang_Cursor_getSpellingNameRange(Cursor, pieceIndex, 0);
2359 if (clang_Cursor_getObjCSelectorIndex(Cursor) != -1)
2361 clang_Cursor_getObjCSelectorIndex(Cursor));
2362 if (clang_Cursor_isDynamicCall(Cursor))
2364 if (Cursor.kind == CXCursor_ObjCMessageExpr) {
2365 CXType T = clang_Cursor_getReceiverType(Cursor);
2372 CXModule mod = clang_Cursor_getModule(Cursor);
2414 CXCursor cursor, CXSourceRange range) {
2418 PrintCursor(cursor, NULL);
2431 CXCursor Cursor;
2498 Cursor = clang_getCursor(TU,
2507 PrintCursor(Cursor, NULL);
2509 clang_findReferencesInFile(Cursor, file, visitor);
2527 CXCursor cursor, CXSourceRange range) {
2528 PrintCursor(cursor, NULL);
2870 PrintCursor(Attr->cursor, NULL);
2877 printf(" | cursor: ");
2878 PrintCursor(info->cursor, NULL);
2889 printf(" | cursor: ");
2890 PrintCursor(ProtoInfo->protocols[i]->cursor, NULL);
3020 printf(" | cursor: ");
3021 PrintCursor(info->cursor, NULL);
3041 PrintCursor(Attr->cursor, NULL);
3063 printf(" | cursor: ");
3109 printf(" | cursor: ");
3110 PrintCursor(info->cursor, NULL);
4086 " c-index-test -cursor-at=<site> <compiler arguments>\n"
4150 if (argc > 2 && strstr(argv[1], "-cursor-at=") == argv[1])