forked from qt-creator/qt-creator
C++: Fix weird logic in usage of TopLevelDeclarationProcessor::processDeclaration
As the name function name suggests, true should be returned if the declaration should be processed. Otherwise false. Change-Id: I8d266d99c579b331fee8772bde47aa1a466dae9c Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
committed by
Erik Verbruggen
parent
0832a0deac
commit
349de9331c
2
src/libs/3rdparty/cplusplus/Parser.cpp
vendored
2
src/libs/3rdparty/cplusplus/Parser.cpp
vendored
@@ -541,7 +541,7 @@ bool Parser::parseTranslationUnit(TranslationUnitAST *&node)
|
|||||||
|
|
||||||
|
|
||||||
if (TopLevelDeclarationProcessor *processor = _control->topLevelDeclarationProcessor()) {
|
if (TopLevelDeclarationProcessor *processor = _control->topLevelDeclarationProcessor()) {
|
||||||
if (processor->processDeclaration(declaration))
|
if (!processor->processDeclaration(declaration))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -584,7 +584,7 @@ void CppEditorSupport::recalculateSemanticInfoDetached_helper(QFutureInterface<v
|
|||||||
virtual ~TLDProc() {}
|
virtual ~TLDProc() {}
|
||||||
virtual bool processDeclaration(DeclarationAST *ast) {
|
virtual bool processDeclaration(DeclarationAST *ast) {
|
||||||
Q_UNUSED(ast);
|
Q_UNUSED(ast);
|
||||||
return m_theFuture.isCanceled();
|
return !m_theFuture.isCanceled();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user