Lines Matching defs:Cursor
588 static void PrintCursorComments(CXCursor Cursor,
596 RawComment = clang_Cursor_getRawCommentText(Cursor);
600 PrintRange(clang_Cursor_getCommentRange(Cursor), "RawCommentRange");
602 BriefComment = clang_Cursor_getBriefCommentText(Cursor);
612 CXComment Comment = clang_Cursor_getParsedComment(Cursor);
642 static void PrintCursor(CXCursor Cursor, const char *CommentSchemaFile) {
643 CXTranslationUnit TU = clang_Cursor_getTranslationUnit(Cursor);
644 if (clang_isInvalid(Cursor.kind)) {
645 CXString ks = clang_getCursorKindSpelling(Cursor.kind);
646 printf("Invalid Cursor => %s", clang_getCString(ks));
667 ks = clang_getCursorKindSpelling(Cursor.kind);
668 string = want_display_name? clang_getCursorDisplayName(Cursor)
669 : clang_getCursorSpelling(Cursor);
675 Referenced = clang_getCursorReferenced(Cursor);
698 if (clang_isCursorDefinition(Cursor))
701 switch (clang_getCursorAvailability(Cursor)) {
719 = clang_getCursorPlatformAvailability(Cursor,
759 if (clang_CXXMethod_isStatic(Cursor))
761 if (clang_CXXMethod_isVirtual(Cursor))
763 if (clang_CXXMethod_isConst(Cursor))
765 if (clang_CXXMethod_isPureVirtual(Cursor))
767 if (clang_Cursor_isVariadic(Cursor))
769 if (clang_Cursor_isObjCOptional(Cursor))
772 if (Cursor.kind == CXCursor_IBOutletCollectionAttr) {
774 clang_getCanonicalType(clang_getIBOutletCollectionType(Cursor));
780 if (Cursor.kind == CXCursor_CXXBaseSpecifier) {
781 enum CX_CXXAccessSpecifier access = clang_getCXXAccessSpecifier(Cursor);
782 unsigned isVirtual = clang_isVirtualBase(Cursor);
800 SpecializationOf = clang_getSpecializedCursorTemplate(Cursor);
809 if (Cursor.kind == CXCursor_FunctionDecl) {
811 unsigned NumTemplateArgs = clang_Cursor_getNumTemplateArguments(Cursor);
815 clang_Cursor_getTemplateArgumentKind(Cursor, I);
819 CXType T = clang_Cursor_getTemplateArgumentType(Cursor, I);
828 I, TAK, clang_Cursor_getTemplateArgumentValue(Cursor, I));
837 clang_getOverriddenCursors(Cursor, &overridden, &num_overridden);
860 if (Cursor.kind == CXCursor_InclusionDirective) {
861 CXFile File = clang_getIncludedFile(Cursor);
870 CursorExtent = clang_getCursorExtent(Cursor);
871 RefNameRange = clang_getCursorReferenceNameRange(Cursor,
880 RefNameRange = clang_getCursorReferenceNameRange(Cursor,
890 PrintCursorComments(Cursor, CommentSchemaFile);
893 unsigned PropAttrs = clang_Cursor_getObjCPropertyAttributes(Cursor, 0);
915 unsigned QT = clang_Cursor_getObjCDeclQualifiers(Cursor);
932 static const char* GetCursorSource(CXCursor Cursor) {
933 CXSourceLocation Loc = clang_getCursorLocation(Cursor);
1063 enum CXChildVisitResult FilteredPrintingVisitor(CXCursor Cursor,
1067 if (!Data->Filter || (Cursor.kind == *(enum CXCursorKind *)Data->Filter)) {
1068 CXSourceLocation Loc = clang_getCursorLocation(Cursor);
1072 GetCursorSource(Cursor), line, column);
1073 PrintCursor(Cursor, Data->CommentSchemaFile);
1074 PrintCursorExtent(Cursor);
1075 if (clang_isDeclaration(Cursor.kind)) {
1076 enum CX_CXXAccessSpecifier access = clang_getCXXAccessSpecifier(Cursor);
1099 static enum CXChildVisitResult FunctionScanVisitor(CXCursor Cursor,
1107 if (Cursor.kind != CXCursor_FunctionDecl ||
1108 !clang_isCursorDefinition(Cursor))
1111 clang_getDefinitionSpellingAndExtent(Cursor, &startBuf, &endBuf,
1130 Loc = clang_getCursorLocation(Cursor);
1214 static enum CXChildVisitResult PrintLinkage(CXCursor cursor, CXCursor p,
1218 if (clang_isInvalid(clang_getCursorKind(cursor)))
1221 switch (clang_getCursorLinkage(cursor)) {
1230 PrintCursor(cursor, NULL);
1259 static enum CXChildVisitResult PrintType(CXCursor cursor, CXCursor p,
1261 if (!clang_isInvalid(clang_getCursorKind(cursor))) {
1262 CXType T = clang_getCursorType(cursor);
1264 PrintCursor(cursor, NULL);
1285 CXType RT = clang_getCursorResultType(cursor);
1292 int NumArgs = clang_Cursor_getNumArguments(cursor);
1297 CXType T = clang_getCursorType(clang_Cursor_getArgument(cursor, i));
1338 unsigned isAnon = clang_Cursor_isAnonymous(cursor);
1351 static enum CXChildVisitResult PrintTypeSize(CXCursor cursor, CXCursor p,
1354 enum CXCursorKind K = clang_getCursorKind(cursor);
1357 T = clang_getCursorType(cursor);
1358 PrintCursor(cursor, NULL);
1376 CXString FieldSpelling = clang_getCursorSpelling(cursor);
1381 if (clang_getCursorKind(cursor) == CXCursor_FieldDecl) {
1394 long long Offset2 = clang_Cursor_getOffsetOfField(cursor);
1407 int IsBitfield = clang_Cursor_isBitField(cursor);
1409 printf(" [BitFieldSize=%d]", clang_getFieldDeclBitWidth(cursor));
1419 static enum CXChildVisitResult PrintMangledName(CXCursor cursor, CXCursor p,
1422 PrintCursor(cursor, NULL);
1423 MangledName = clang_Cursor_getMangling(cursor);
1433 static enum CXChildVisitResult PrintBitWidth(CXCursor cursor, CXCursor p,
1436 if (clang_getCursorKind(cursor) != CXCursor_FieldDecl)
1439 Bitwidth = clang_getFieldDeclBitWidth(cursor);
1441 PrintCursor(cursor, NULL);
1662 static void print_cursor_file_scan(CXTranslationUnit TU, CXCursor cursor,
1671 PrintCursor(cursor, NULL);
1702 CXCursor cursor;
1711 /* Check the cursor at this position, and dump the previous one if we have
1714 cursor = clang_getCursor(TU, clang_getLocation(TU, file, line, col));
1715 if ((c == EOF || !clang_equalCursors(cursor, prevCursor)) &&
1725 prevCursor = cursor;
2198 CXCursor Cursor;
2205 while (strstr(argv[NumLocations+1], "-cursor-at=") == argv[NumLocations+1])
2213 const char *input = argv[Loc + 1] + strlen("-cursor-at=");
2264 Cursor = clang_getCursor(TU,
2273 Cursor);
2274 CXSourceLocation CursorLoc = clang_getCursorLocation(Cursor);
2280 PrintCursor(Cursor, NULL);
2281 PrintCursorExtent(Cursor);
2282 Spelling = clang_getCursorSpelling(Cursor);
2289 clang_Cursor_getSpellingNameRange(Cursor, pieceIndex, 0);
2297 if (clang_Cursor_getObjCSelectorIndex(Cursor) != -1)
2299 clang_Cursor_getObjCSelectorIndex(Cursor));
2300 if (clang_Cursor_isDynamicCall(Cursor))
2302 if (Cursor.kind == CXCursor_ObjCMessageExpr) {
2303 CXType T = clang_Cursor_getReceiverType(Cursor);
2310 CXModule mod = clang_Cursor_getModule(Cursor);
2352 CXCursor cursor, CXSourceRange range) {
2356 PrintCursor(cursor, NULL);
2369 CXCursor Cursor;
2436 Cursor = clang_getCursor(TU,
2445 PrintCursor(Cursor, NULL);
2447 clang_findReferencesInFile(Cursor, file, visitor);
2465 CXCursor cursor, CXSourceRange range) {
2466 PrintCursor(cursor, NULL);
2808 PrintCursor(Attr->cursor, NULL);
2815 printf(" | cursor: ");
2816 PrintCursor(info->cursor, NULL);
2827 printf(" | cursor: ");
2828 PrintCursor(ProtoInfo->protocols[i]->cursor, NULL);
2958 printf(" | cursor: ");
2959 PrintCursor(info->cursor, NULL);
2979 PrintCursor(Attr->cursor, NULL);
3001 printf(" | cursor: ");
3047 printf(" | cursor: ");
3048 PrintCursor(info->cursor, NULL);
4024 " c-index-test -cursor-at=<site> <compiler arguments>\n"
4087 if (argc > 2 && strstr(argv[1], "-cursor-at=") == argv[1])