forked from qt-creator/qt-creator
CppEditor: Generate doxygen comments for functions with macros
...at least for object-like macros. This handles the common case where a macro before the function signature annotates the DLL import/export. Task-number: QTCREATORBUG-15819 Change-Id: I79f22508188019402fb7345222408aaf90106f20 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
This commit is contained in:
@@ -38,7 +38,9 @@ FastPreprocessor::FastPreprocessor(const Snapshot &snapshot)
|
||||
, _addIncludesToCurrentDoc(false)
|
||||
{ }
|
||||
|
||||
QByteArray FastPreprocessor::run(Document::Ptr newDoc, const QByteArray &source)
|
||||
QByteArray FastPreprocessor::run(Document::Ptr newDoc,
|
||||
const QByteArray &source,
|
||||
bool mergeDefinedMacrosOfDocument)
|
||||
{
|
||||
std::swap(newDoc, _currentDoc);
|
||||
_addIncludesToCurrentDoc = _currentDoc->resolvedIncludes().isEmpty()
|
||||
@@ -57,6 +59,9 @@ QByteArray FastPreprocessor::run(Document::Ptr newDoc, const QByteArray &source)
|
||||
|
||||
foreach (const Document::Include &i, doc->resolvedIncludes())
|
||||
mergeEnvironment(i.resolvedFileName());
|
||||
|
||||
if (mergeDefinedMacrosOfDocument)
|
||||
_env.addMacros(_currentDoc->definedMacros());
|
||||
}
|
||||
|
||||
const QByteArray preprocessed = _preproc.run(fileName, source);
|
||||
|
||||
Reference in New Issue
Block a user