Commit b032aee5 authored by Olivier Goffart's avatar Olivier Goffart Committed by Martin Smith
Browse files

Use clang as a parser in qdoc


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: default avatarTopi Reiniö <topi.reinio@qt.io>
parent 3c74e259
No related merge requests found
Showing with 1277 additions and 932 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment