From b032aee53c8fb6807485186f276ca25b86ac1251 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 3 Mar 2016 13:12:47 +0100 Subject: Use clang as a parser in qdoc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The file qt_find_clang.prf is inspired by qtcreator's clang_installation.pri. The code from the while loop in ClangVisitor::parseProperty contains code moved from CppCodeParser::matchProperty. The code in the for loop of ClangCodeParser::parseSourceFile (from the "Doc parses the comment"), is mostly moved from CppCodeParser::matchDocsAndStuff. In CppCodeParser, most of the code is removed since clang is used for parsing. We just need to leave enough to parse the declaration in the comments which still use the old parser (\fn, ...) Known issues: - When the parameter name is a comment, it is lost. (e.g. QObject::eventFilter(QObject * /* watched */, QEvent * /* event */) - I can't compute default parameters when they are expanded from a macro. (e.g. QObject::tr) - Instances of #ifndef Q_QDOC need to be reviewed Change-Id: I92d4ca4fc52810d9d3de433147a9953eea3a1802 Reviewed-by: Topi Reiniƶ --- src/qdoc/qmlcodeparser.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/qdoc/qmlcodeparser.cpp') diff --git a/src/qdoc/qmlcodeparser.cpp b/src/qdoc/qmlcodeparser.cpp index 31da874fe..31775bb1b 100644 --- a/src/qdoc/qmlcodeparser.cpp +++ b/src/qdoc/qmlcodeparser.cpp @@ -204,14 +204,6 @@ void QmlCodeParser::parseSourceFile(const Location& location, const QString& fil #endif } -/*! - Performs cleanup after qdoc is done parsing all the QML files. - Currently, no cleanup is required. - */ -void QmlCodeParser::doneParsingSourceFiles() -{ -} - static QSet topicCommands_; /*! Returns the set of strings representing the topic commands. -- cgit v1.2.1