Commit 28f5c46c authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

CppTools: Deduplicate null validation



Change-Id: I291fd7d755f08a533bb2686024858b11fabd9bed
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent dea4531b
......@@ -1888,8 +1888,7 @@ bool CppCompletionAssistProcessor::completeConstructorOrFunction(const QList<CPl
if (doc->parse(Document::ParseDeclaration)) {
doc->check();
if (SimpleDeclarationAST *sd = doc->translationUnit()->ast()->asSimpleDeclaration()) {
if (sd->declarator_list &&
sd->declarator_list && sd->declarator_list->value->postfix_declarator_list
if (sd->declarator_list && sd->declarator_list->value->postfix_declarator_list
&& sd->declarator_list->value->postfix_declarator_list->value->asFunctionDeclarator()) {
autocompleteSignature = true;
......
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