C++: Completion for catch-clause arguments

Task-number: QTCREATORBUG-2822

Change-Id: Ia5a05e1c47c88ef3350b7223578ba800ee464c8c
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
Leandro Melo
2012-09-07 14:25:50 +02:00
parent 93e3c3f36f
commit 0e9568da3f

View File

@@ -2098,7 +2098,16 @@ bool Bind::visit(ExceptionDeclarationAST *ast)
}
DeclaratorIdAST *declaratorId = 0;
type = this->declarator(ast->declarator, type, &declaratorId);
const Name *argName = 0;
if (declaratorId && declaratorId->name)
argName = declaratorId->name->name;
Argument *arg = control()->newArgument(location(declaratorId, ast->firstToken()), argName);
arg->setType(type);
_scope->addMember(arg);
// unsigned dot_dot_dot_token = ast->dot_dot_dot_token;
return false;
}