diff --git a/plugins/clang/duchain/builder.cpp b/plugins/clang/duchain/builder.cpp --- a/plugins/clang/duchain/builder.cpp +++ b/plugins/clang/duchain/builder.cpp @@ -946,7 +946,11 @@ void Visitor::setDeclData(CXCursor cursor, Declaration *decl, bool setComment) const { if (setComment) +#if CINDEX_VERSION_MINOR > 100 // FIXME https://bugs.llvm.org/show_bug.cgi?id=35333 decl->setComment(makeComment(clang_Cursor_getParsedComment(cursor))); +#else + decl->setComment(QByteArray(clang_getCString(clang_Cursor_getRawCommentText(cursor)))); +#endif if (CursorKindTraits::isAliasType(CK)) { decl->setIsTypeAlias(true); } diff --git a/plugins/clang/duchain/parsesession.cpp b/plugins/clang/duchain/parsesession.cpp --- a/plugins/clang/duchain/parsesession.cpp +++ b/plugins/clang/duchain/parsesession.cpp @@ -70,14 +70,21 @@ // We remove the -Werror flag, and replace -Werror=foo by -Wfoo. // Warning as error may cause problem to the clang parser. const auto asError = QByteArrayLiteral("-Werror="); + const auto documentation = QByteArrayLiteral("-Wdocumentation"); for (auto& argument : arguments) { if (argument == "-Werror") { argument.clear(); } else if (argument.startsWith(asError)) { // replace -Werror=foo by -Wfoo argument.remove(2, asError.length() - 2); } +#if CINDEX_VERSION_MINOR < 100 // FIXME https://bugs.llvm.org/show_bug.cgi?id=35333 + if ( argument == documentation ) { + argument.clear(); + } +#endif } + } QVector argsForSession(const QString& path, ParseSessionData::Options options, const ParserSettings& parserSettings)