forked from qt-creator/qt-creator
Cleanup postfix declarators.
This commit is contained in:
@@ -458,7 +458,7 @@ bool CheckUndefinedSymbols::visit(SizeofExpressionAST *ast)
|
||||
} else if (type_id->declarator
|
||||
&& type_id->declarator->postfix_declarators
|
||||
&& ! type_id->declarator->postfix_declarators->next
|
||||
&& type_id->declarator->postfix_declarators->asArrayDeclarator() != 0) {
|
||||
&& type_id->declarator->postfix_declarators->value->asArrayDeclarator() != 0) {
|
||||
// this sizeof expression is ambiguos, e.g.
|
||||
// sizeof(a[10])
|
||||
// `a' can be a typeid or an expression.
|
||||
|
||||
@@ -416,8 +416,8 @@ bool FindUsages::visit(ParameterDeclarationAST *ast)
|
||||
if (! _inSimpleDeclaration) // visit the core declarator only if we are not in simple-declaration.
|
||||
accept(declarator->core_declarator);
|
||||
|
||||
for (PostfixDeclaratorAST *fx_op = declarator->postfix_declarators; fx_op; fx_op = fx_op->next)
|
||||
accept(fx_op);
|
||||
for (PostfixDeclaratorListAST *it = declarator->postfix_declarators; it; it = it->next)
|
||||
accept(it->value);
|
||||
|
||||
for (SpecifierAST *spec = declarator->post_attributes; spec; spec = spec->next)
|
||||
accept(spec);
|
||||
|
||||
Reference in New Issue
Block a user