Commit c0cebf97 authored by Christian Kamm's avatar Christian Kamm
Browse files

C++ function signature: Avoid hitting a QTC_ASSERT.



Change-Id: I0390e51a7d1fc4563eed791c9f8c8ed403398663
Reviewed-by: default avatarLeandro Melo <leandro.melo@nokia.com>
parent 60830e00
......@@ -667,10 +667,12 @@ Utils::ChangeSet FunctionDeclDefLink::changes(const Snapshot &snapshot, int targ
// make a easy to access list of the target parameter declarations
QVarLengthArray<ParameterDeclarationAST *, 10> targetParameterDecls;
QTC_ASSERT(targetFunctionDeclarator->parameter_declaration_clause, return changes);
for (ParameterDeclarationListAST *it = targetFunctionDeclarator->parameter_declaration_clause->parameter_declaration_list;
it; it = it->next) {
targetParameterDecls.append(it->value);
// there is no parameter declaration clause if the function has no arguments
if (targetFunctionDeclarator->parameter_declaration_clause) {
for (ParameterDeclarationListAST *it = targetFunctionDeclarator->parameter_declaration_clause->parameter_declaration_list;
it; it = it->next) {
targetParameterDecls.append(it->value);
}
}
// the number of parameters in sourceFunction or targetFunction
......
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