Commit 349de933 authored by Nikolai Kosjar's avatar Nikolai Kosjar Committed by Erik Verbruggen

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: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent 0832a0de
......@@ -541,7 +541,7 @@ bool Parser::parseTranslationUnit(TranslationUnitAST *&node)
if (TopLevelDeclarationProcessor *processor = _control->topLevelDeclarationProcessor()) {
if (processor->processDeclaration(declaration))
if (!processor->processDeclaration(declaration))
break;
}
......
......@@ -584,7 +584,7 @@ void CppEditorSupport::recalculateSemanticInfoDetached_helper(QFutureInterface<v
virtual ~TLDProc() {}
virtual bool processDeclaration(DeclarationAST *ast) {
Q_UNUSED(ast);
return m_theFuture.isCanceled();
return !m_theFuture.isCanceled();
}
};
......
Markdown is supported
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