| 1012 | //BEGIN setDeclData |
| 1013 | template<CXCursorKind CK> |
| 1014 | void Visitor::setDeclData(CXCursor cursor, Declaration *decl, bool setComment) const |
| 1015 | { |
| 1016 | if (setComment) |
| 1017 | #if CINDEX_VERSION_MINOR < 100 // FIXME https://bugs.llvm.org/show_bug.cgi?id=35333 |
| 1018 | decl->setComment(KDevelop::formatComment(ClangString(clang_Cursor_getRawCommentText(cursor)).toByteArray())); |
| 1019 | #else |
| 1020 | decl->setComment(makeComment(clang_Cursor_getParsedComment(cursor))); |
| 1021 | #endif |
| 1022 | if (CursorKindTraits::isAliasType(CK)) { |
| 1023 | decl->setIsTypeAlias(true); |
| 1024 | } |
| 1025 | if (CK == CXCursor_Namespace) |
| 1026 | decl->setKind(Declaration::Namespace); |
| 1027 | if (CK == CXCursor_EnumDecl || CK == CXCursor_EnumConstantDecl || CursorKindTraits::isClass(CK) || CursorKindTraits::isAliasType(CK)) |
| 1028 | decl->setKind(Declaration::Type); |
| 1029 | |
| 1030 | int isAlwaysDeprecated; |
| 1031 | clang_getCursorPlatformAvailability(cursor, &isAlwaysDeprecated, nullptr, nullptr, nullptr, nullptr, 0); |
| 1032 | decl->setDeprecated(isAlwaysDeprecated); |
| 1033 | } |
| 1034 | |
| 1035 | /// @return the position in @p contents where the macro identifier ends. |
| 1036 | static int skipMacroIdentifier(QStringView contents) |
nothing calls this directly
no test coverage detected