diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2013-03-24 11:51:51 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2013-03-24 11:51:51 (GMT) |
commit | deaa34e0c1d990f37fe00e465ac7a22f705904f0 (patch) | |
tree | 8d5749ba8d587d7b753162c524b18f7e7cdf6a0b /src/filedef.cpp | |
parent | aacd1557af129e2bff3514169e04168376a2431b (diff) | |
download | Doxygen-deaa34e0c1d990f37fe00e465ac7a22f705904f0.zip Doxygen-deaa34e0c1d990f37fe00e465ac7a22f705904f0.tar.gz Doxygen-deaa34e0c1d990f37fe00e465ac7a22f705904f0.tar.bz2 |
Release-1.8.3.1-20130324
Diffstat (limited to 'src/filedef.cpp')
-rw-r--r-- | src/filedef.cpp | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/src/filedef.cpp b/src/filedef.cpp index ae700e4..9c8e944 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -41,6 +41,8 @@ #include "membergroup.h" #include "dirdef.h" #include "config.h" +#include "clangparser.h" +#include "settings.h" //--------------------------------------------------------------------------- @@ -794,7 +796,7 @@ void FileDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const /*! Write a source listing of this file to the output */ void FileDef::writeSource(OutputList &ol) { - static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); + static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW"); static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES"); static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE"); QCString title = docname; @@ -843,14 +845,29 @@ void FileDef::writeSource(OutputList &ol) if (latexSourceCode) ol.enable(OutputGenerator::Latex); } - ParserInterface *pIntf = Doxygen::parserManager->getParser(getDefFileExtension()); - pIntf->resetCodeParserState(); - ol.startCodeFragment(); - pIntf->parseCode(ol,0, - fileToString(absFilePath(),filterSourceFiles,TRUE), - FALSE,0,this - ); - ol.endCodeFragment(); +#if USE_LIBCLANG + static bool clangAssistedParsing = Config_getBool("CLANG_ASSISTED_PARSING"); + if (clangAssistedParsing && + (getLanguage()==SrcLangExt_Cpp || getLanguage()==SrcLangExt_ObjC)) + { + ol.startCodeFragment(); + ClangParser::instance()->start(absFilePath()); + ClangParser::instance()->writeSources(ol,this); + ClangParser::instance()->finish(); + ol.endCodeFragment(); + } + else +#endif + { + ParserInterface *pIntf = Doxygen::parserManager->getParser(getDefFileExtension()); + pIntf->resetCodeParserState(); + ol.startCodeFragment(); + pIntf->parseCode(ol,0, + fileToString(absFilePath(),filterSourceFiles,TRUE), + FALSE,0,this + ); + ol.endCodeFragment(); + } ol.endContents(); endFileWithNavPath(this,ol); ol.enableAll(); @@ -1659,7 +1676,7 @@ void FileDef::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCS } else { - ml->writeDeclarations(ol,0,0,this,0,title,0); + ml->writeDeclarations(ol,0,0,this,0,title,0,definitionType()); } } } |