forked from qt-creator/qt-creator
Fixed the AST field names.
This commit is contained in:
@@ -103,7 +103,7 @@ bool CheckUndefinedSymbols::isType(const QByteArray &name) const
|
||||
for (int i = _templateDeclarationStack.size() - 1; i != - 1; --i) {
|
||||
TemplateDeclarationAST *templateDeclaration = _templateDeclarationStack.at(i);
|
||||
|
||||
for (DeclarationListAST *it = templateDeclaration->template_parameters; it; it = it->next) {
|
||||
for (DeclarationListAST *it = templateDeclaration->template_parameter_list; it; it = it->next) {
|
||||
DeclarationAST *templateParameter = it->value;
|
||||
|
||||
if (templateParameterName(templateParameter) == name)
|
||||
@@ -424,7 +424,7 @@ bool CheckUndefinedSymbols::visit(CastExpressionAST *ast)
|
||||
{
|
||||
if (ast->lparen_token && ast->type_id && ast->rparen_token && ast->expression) {
|
||||
if (TypeIdAST *cast_type_id = ast->type_id->asTypeId()) {
|
||||
SpecifierListAST *type_specifier = cast_type_id->type_specifier;
|
||||
SpecifierListAST *type_specifier = cast_type_id->type_specifier_list;
|
||||
if (! cast_type_id->declarator && type_specifier && ! type_specifier->next &&
|
||||
type_specifier->value->asNamedTypeSpecifier() && ast->expression &&
|
||||
ast->expression->asUnaryExpression()) {
|
||||
@@ -447,7 +447,7 @@ bool CheckUndefinedSymbols::visit(SizeofExpressionAST *ast)
|
||||
{
|
||||
if (ast->lparen_token && ast->expression && ast->rparen_token) {
|
||||
if (TypeIdAST *type_id = ast->expression->asTypeId()) {
|
||||
SpecifierListAST *type_specifier = type_id->type_specifier;
|
||||
SpecifierListAST *type_specifier = type_id->type_specifier_list;
|
||||
if (! type_id->declarator && type_specifier && ! type_specifier->next &&
|
||||
type_specifier->value->asNamedTypeSpecifier()) {
|
||||
// this sizeof expression is ambiguos, e.g.
|
||||
@@ -455,9 +455,9 @@ bool CheckUndefinedSymbols::visit(SizeofExpressionAST *ast)
|
||||
// `a' can be a typeid or a nested-expression.
|
||||
return false;
|
||||
} else if (type_id->declarator
|
||||
&& type_id->declarator->postfix_declarators
|
||||
&& ! type_id->declarator->postfix_declarators->next
|
||||
&& type_id->declarator->postfix_declarators->value->asArrayDeclarator() != 0) {
|
||||
&& type_id->declarator->postfix_declarator_list
|
||||
&& ! type_id->declarator->postfix_declarator_list->next
|
||||
&& type_id->declarator->postfix_declarator_list->value->asArrayDeclarator() != 0) {
|
||||
// this sizeof expression is ambiguos, e.g.
|
||||
// sizeof(a[10])
|
||||
// `a' can be a typeid or an expression.
|
||||
|
||||
@@ -413,7 +413,7 @@ void Document::check(CheckMode mode)
|
||||
return; // nothing to do.
|
||||
|
||||
if (TranslationUnitAST *ast = _translationUnit->ast()->asTranslationUnit()) {
|
||||
for (DeclarationListAST *decl = ast->declarations; decl; decl = decl->next) {
|
||||
for (DeclarationListAST *decl = ast->declaration_list; decl; decl = decl->next) {
|
||||
semantic.check(decl->value, globals);
|
||||
}
|
||||
} else if (ExpressionAST *ast = _translationUnit->ast()->asExpression()) {
|
||||
|
||||
@@ -288,7 +288,7 @@ void FindUsages::checkExpression(unsigned startToken, unsigned endToken)
|
||||
|
||||
bool FindUsages::visit(QualifiedNameAST *ast)
|
||||
{
|
||||
for (NestedNameSpecifierListAST *it = ast->nested_name_specifier; it; it = it->next) {
|
||||
for (NestedNameSpecifierListAST *it = ast->nested_name_specifier_list; it; it = it->next) {
|
||||
NestedNameSpecifierAST *nested_name_specifier = it->value;
|
||||
|
||||
if (NameAST *class_or_namespace_name = nested_name_specifier->class_or_namespace_name) {
|
||||
@@ -299,7 +299,7 @@ bool FindUsages::visit(QualifiedNameAST *ast)
|
||||
template_id = class_or_namespace_name->asTemplateId();
|
||||
|
||||
if (template_id) {
|
||||
for (TemplateArgumentListAST *arg_it = template_id->template_arguments; arg_it; arg_it = arg_it->next) {
|
||||
for (TemplateArgumentListAST *arg_it = template_id->template_argument_list; arg_it; arg_it = arg_it->next) {
|
||||
accept(arg_it->value);
|
||||
}
|
||||
}
|
||||
@@ -332,7 +332,7 @@ bool FindUsages::visit(QualifiedNameAST *ast)
|
||||
if (template_id) {
|
||||
identifier_token = template_id->identifier_token;
|
||||
|
||||
for (TemplateArgumentListAST *template_arguments = template_id->template_arguments;
|
||||
for (TemplateArgumentListAST *template_arguments = template_id->template_argument_list;
|
||||
template_arguments; template_arguments = template_arguments->next) {
|
||||
accept(template_arguments->value);
|
||||
}
|
||||
@@ -392,7 +392,7 @@ bool FindUsages::visit(TemplateIdAST *ast)
|
||||
reportResult(ast->identifier_token, candidates);
|
||||
}
|
||||
|
||||
for (TemplateArgumentListAST *template_arguments = ast->template_arguments;
|
||||
for (TemplateArgumentListAST *template_arguments = ast->template_argument_list;
|
||||
template_arguments; template_arguments = template_arguments->next) {
|
||||
accept(template_arguments->value);
|
||||
}
|
||||
@@ -402,23 +402,23 @@ bool FindUsages::visit(TemplateIdAST *ast)
|
||||
|
||||
bool FindUsages::visit(ParameterDeclarationAST *ast)
|
||||
{
|
||||
for (SpecifierListAST *it = ast->type_specifier; it; it = it->next)
|
||||
for (SpecifierListAST *it = ast->type_specifier_list; it; it = it->next)
|
||||
accept(it->value);
|
||||
|
||||
if (DeclaratorAST *declarator = ast->declarator) {
|
||||
for (SpecifierListAST *it = declarator->attributes; it; it = it->next)
|
||||
for (SpecifierListAST *it = declarator->attribute_list; it; it = it->next)
|
||||
accept(it->value);
|
||||
|
||||
for (PtrOperatorListAST *it = declarator->ptr_operators; it; it = it->next)
|
||||
for (PtrOperatorListAST *it = declarator->ptr_operator_list; it; it = it->next)
|
||||
accept(it->value);
|
||||
|
||||
if (! _inSimpleDeclaration) // visit the core declarator only if we are not in simple-declaration.
|
||||
accept(declarator->core_declarator);
|
||||
|
||||
for (PostfixDeclaratorListAST *it = declarator->postfix_declarators; it; it = it->next)
|
||||
for (PostfixDeclaratorListAST *it = declarator->postfix_declarator_list; it; it = it->next)
|
||||
accept(it->value);
|
||||
|
||||
for (SpecifierListAST *it = declarator->post_attributes; it; it = it->next)
|
||||
for (SpecifierListAST *it = declarator->post_attribute_list; it; it = it->next)
|
||||
accept(it->value);
|
||||
|
||||
accept(declarator->initializer);
|
||||
@@ -438,7 +438,7 @@ bool FindUsages::visit(FunctionDeclaratorAST *ast)
|
||||
{
|
||||
accept(ast->parameters);
|
||||
|
||||
for (SpecifierListAST *it = ast->cv_qualifier_seq; it; it = it->next)
|
||||
for (SpecifierListAST *it = ast->cv_qualifier_list; it; it = it->next)
|
||||
accept(it->value);
|
||||
|
||||
accept(ast->exception_specification);
|
||||
|
||||
@@ -170,8 +170,8 @@ bool ResolveExpression::visit(NewExpressionAST *ast)
|
||||
{
|
||||
if (ast->new_type_id) {
|
||||
Scope *scope = _context.expressionDocument()->globalSymbols();
|
||||
FullySpecifiedType ty = sem.check(ast->new_type_id->type_specifier, scope);
|
||||
ty = sem.check(ast->new_type_id->ptr_operators, ty, scope);
|
||||
FullySpecifiedType ty = sem.check(ast->new_type_id->type_specifier_list, scope);
|
||||
ty = sem.check(ast->new_type_id->ptr_operator_list, ty, scope);
|
||||
FullySpecifiedType ptrTy(control()->pointerType(ty));
|
||||
addResult(ptrTy);
|
||||
}
|
||||
@@ -208,7 +208,7 @@ bool ResolveExpression::visit(PostfixExpressionAST *ast)
|
||||
{
|
||||
accept(ast->base_expression);
|
||||
|
||||
for (PostfixListAST *it = ast->postfix_expressions; it; it = it->next) {
|
||||
for (PostfixListAST *it = ast->postfix_expression_list; it; it = it->next) {
|
||||
accept(it->value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user