Commit 0ae2d96a authored by Roberto Raggi's avatar Roberto Raggi

Fixed the AST field names.

parent e5eb88a3
......@@ -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);
}
......
......@@ -239,7 +239,7 @@ protected:
return;
else if (TemplateIdAST *template_id = name->asTemplateId()) {
for (TemplateArgumentListAST *it = template_id->template_arguments; it; it = it->next) {
for (TemplateArgumentListAST *it = template_id->template_argument_list; it; it = it->next) {
accept(it->value);
}
}
......@@ -276,7 +276,7 @@ protected:
virtual bool visit(TemplateIdAST *ast)
{
for (TemplateArgumentListAST *arg = ast->template_arguments; arg; arg = arg->next)
for (TemplateArgumentListAST *arg = ast->template_argument_list; arg; arg = arg->next)
accept(arg->value);
unsigned line, column;
......@@ -308,7 +308,7 @@ protected:
virtual bool 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)
searchUsesInTemplateArguments(it->value->class_or_namespace_name);
searchUsesInTemplateArguments(ast->unqualified_name);
......@@ -318,7 +318,7 @@ protected:
virtual bool 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) {
PostfixAST *fx = it->value;
if (fx->asMemberAccess() != 0)
continue; // skip members
......@@ -366,7 +366,7 @@ protected:
{
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);
......@@ -439,7 +439,7 @@ public:
if (ast) {
if (ast->declarator) {
_visitFunctionDeclarator = true;
accept(ast->declarator->postfix_declarators);
accept(ast->declarator->postfix_declarator_list);
}
_visitFunctionDeclarator = false;
......
......@@ -1072,8 +1072,8 @@ bool CppCodeCompletion::completeConstructorOrFunction(const QList<TypeOfExpressi
if (doc->parse(Document::ParseDeclaration)) {
doc->check();
if (SimpleDeclarationAST *sd = doc->translationUnit()->ast()->asSimpleDeclaration()) {
if (sd->declarators->value->postfix_declarators
&& sd->declarators->value->postfix_declarators->value->asFunctionDeclarator()) {
if (sd->declarator_list && sd->declarator_list->value->postfix_declarator_list
&& sd->declarator_list->value->postfix_declarator_list->value->asFunctionDeclarator()) {
autocompleteSignature = true;
}
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -136,7 +136,7 @@ unsigned CheckDeclaration::locationOfDeclaratorId(DeclaratorAST *declarator) con
bool CheckDeclaration::visit(SimpleDeclarationAST *ast)
{
FullySpecifiedType ty = semantic()->check(ast->decl_specifier_seq, _scope);
FullySpecifiedType ty = semantic()->check(ast->decl_specifier_list, _scope);
FullySpecifiedType qualTy = ty.qualifiedType();
if (_templateParameters && ty) {
......@@ -145,8 +145,8 @@ bool CheckDeclaration::visit(SimpleDeclarationAST *ast)
}
}
if (! ast->declarators && ast->decl_specifier_seq && ! ast->decl_specifier_seq->next) {
if (ElaboratedTypeSpecifierAST *elab_type_spec = ast->decl_specifier_seq->value->asElaboratedTypeSpecifier()) {
if (! ast->declarator_list && ast->decl_specifier_list && ! ast->decl_specifier_list->next) {
if (ElaboratedTypeSpecifierAST *elab_type_spec = ast->decl_specifier_list->value->asElaboratedTypeSpecifier()) {
unsigned sourceLocation = elab_type_spec->firstToken();
......@@ -171,7 +171,7 @@ bool CheckDeclaration::visit(SimpleDeclarationAST *ast)
const bool isQ_SIGNAL = ast->qt_invokable_token && tokenKind(ast->qt_invokable_token) == T_Q_SIGNAL;
List<Declaration *> **decl_it = &ast->symbols;
for (DeclaratorListAST *it = ast->declarators; it; it = it->next) {
for (DeclaratorListAST *it = ast->declarator_list; it; it = it->next) {
Name *name = 0;
FullySpecifiedType declTy = semantic()->check(it->value, qualTy,
_scope, &name);
......@@ -208,7 +208,7 @@ bool CheckDeclaration::visit(SimpleDeclarationAST *ast)
symbol->setType(control()->integerType(IntegerType::Int));
symbol->setType(declTy);
if (_templateParameters && it == ast->declarators && ty && ! ty->isClassType())
if (_templateParameters && it == ast->declarator_list && ty && ! ty->isClassType())
symbol->setTemplateParameters(_templateParameters);
symbol->setVisibility(semantic()->currentVisibility());
......@@ -265,7 +265,7 @@ bool CheckDeclaration::visit(AsmDefinitionAST *)
bool CheckDeclaration::visit(ExceptionDeclarationAST *ast)
{
FullySpecifiedType ty = semantic()->check(ast->type_specifier, _scope);
FullySpecifiedType ty = semantic()->check(ast->type_specifier_list, _scope);
FullySpecifiedType qualTy = ty.qualifiedType();
Name *name = 0;
......@@ -291,7 +291,7 @@ bool CheckDeclaration::visit(ExceptionDeclarationAST *ast)
bool CheckDeclaration::visit(FunctionDefinitionAST *ast)
{
FullySpecifiedType ty = semantic()->check(ast->decl_specifier_seq, _scope);
FullySpecifiedType ty = semantic()->check(ast->decl_specifier_list, _scope);
FullySpecifiedType qualTy = ty.qualifiedType();
Name *name = 0;
FullySpecifiedType funTy = semantic()->check(ast->declarator, qualTy,
......@@ -362,7 +362,7 @@ bool CheckDeclaration::visit(MemInitializerAST *ast)
bool CheckDeclaration::visit(LinkageBodyAST *ast)
{
for (DeclarationListAST *decl = ast->declarations; decl; decl = decl->next) {
for (DeclarationListAST *decl = ast->declaration_list; decl; decl = decl->next) {
semantic()->check(decl->value, _scope);
}
return false;
......@@ -410,7 +410,7 @@ bool CheckDeclaration::visit(ParameterDeclarationAST *ast)
}
Name *argName = 0;
FullySpecifiedType ty = semantic()->check(ast->type_specifier, _scope);
FullySpecifiedType ty = semantic()->check(ast->type_specifier_list, _scope);
FullySpecifiedType argTy = semantic()->check(ast->declarator, ty.qualifiedType(),
_scope, &argName);
FullySpecifiedType exprTy = semantic()->check(ast->expression, _scope);
......@@ -427,7 +427,7 @@ bool CheckDeclaration::visit(TemplateDeclarationAST *ast)
{
Scope *scope = new Scope(_scope->owner());
for (DeclarationListAST *param = ast->template_parameters; param; param = param->next) {
for (DeclarationListAST *param = ast->template_parameter_list; param; param = param->next) {
semantic()->check(param->value, scope);
}
......@@ -546,7 +546,7 @@ bool CheckDeclaration::visit(ObjCProtocolDeclarationAST *ast)
}
int previousObjCVisibility = semantic()->switchObjCVisibility(Function::Public);
for (DeclarationListAST *it = ast->member_declarations; it; it = it->next) {
for (DeclarationListAST *it = ast->member_declaration_list; it; it = it->next) {
semantic()->check(it->value, protocol->members());
}
(void) semantic()->switchObjCVisibility(previousObjCVisibility);
......@@ -625,14 +625,14 @@ bool CheckDeclaration::visit(ObjCClassDeclarationAST *ast)
int previousObjCVisibility = semantic()->switchObjCVisibility(Function::Protected);
if (ast->inst_vars_decl) {
for (DeclarationListAST *it = ast->inst_vars_decl->instance_variables; it; it = it->next) {
for (DeclarationListAST *it = ast->inst_vars_decl->instance_variable_list; it; it = it->next) {
semantic()->check(it->value, klass->members());
}
}
(void) semantic()->switchObjCVisibility(Function::Public);
for (DeclarationListAST *it = ast->member_declarations; it; it = it->next) {
for (DeclarationListAST *it = ast->member_declaration_list; it; it = it->next) {
semantic()->check(it->value, klass->members());
}
......@@ -718,7 +718,7 @@ bool CheckDeclaration::visit(ObjCPropertyDeclarationAST *ast)
{
int propAttrs = None;
for (ObjCPropertyAttributeListAST *iter= ast->property_attributes; iter; iter = iter->next) {
for (ObjCPropertyAttributeListAST *iter= ast->property_attribute_list; iter; iter = iter->next) {
ObjCPropertyAttributeAST *attrAst = iter->value;
if (!attrAst)
continue;
......
......@@ -133,8 +133,8 @@ Name **CheckDeclarator::switchName(Name **name)
bool CheckDeclarator::visit(DeclaratorAST *ast)
{
accept(ast->ptr_operators);
accept(ast->postfix_declarators);
accept(ast->ptr_operator_list);
accept(ast->postfix_declarator_list);
accept(ast->core_declarator);
if (ast->initializer) {
......@@ -172,7 +172,7 @@ bool CheckDeclarator::visit(FunctionDeclaratorAST *ast)
fun->setVirtual(true);
if (ast->parameters) {
DeclarationListAST *parameter_declarations = ast->parameters->parameter_declarations;
DeclarationListAST *parameter_declarations = ast->parameters->parameter_declaration_list;
for (DeclarationListAST *decl = parameter_declarations; decl; decl = decl->next) {
semantic()->check(decl->value, fun->arguments());
}
......@@ -196,7 +196,7 @@ bool CheckDeclarator::visit(FunctionDeclaratorAST *ast)
FullySpecifiedType funTy(fun);
_fullySpecifiedType = funTy;
for (SpecifierListAST *it = ast->cv_qualifier_seq; it; it = it->next) {
for (SpecifierListAST *it = ast->cv_qualifier_list; it; it = it->next) {
SimpleSpecifierAST *cv = static_cast<SimpleSpecifierAST *>(it->value);
const int k = tokenKind(cv->specifier_token);
if (k == T_CONST)
......@@ -219,11 +219,11 @@ bool CheckDeclarator::visit(ArrayDeclaratorAST *ast)
bool CheckDeclarator::visit(PointerToMemberAST *ast)
{
Name *memberName = semantic()->check(ast->nested_name_specifier, _scope);
Name *memberName = semantic()->check(ast->nested_name_specifier_list, _scope);
PointerToMemberType *ptrTy = control()->pointerToMemberType(memberName, _fullySpecifiedType);
FullySpecifiedType ty(ptrTy);
_fullySpecifiedType = ty;
applyCvQualifiers(ast->cv_qualifier_seq);
applyCvQualifiers(ast->cv_qualifier_list);
return false;
}
......@@ -232,7 +232,7 @@ bool CheckDeclarator::visit(PointerAST *ast)
PointerType *ptrTy = control()->pointerType(_fullySpecifiedType);
FullySpecifiedType ty(ptrTy);
_fullySpecifiedType = ty;
applyCvQualifiers(ast->cv_qualifier_seq);
applyCvQualifiers(ast->cv_qualifier_list);
return false;
}
......@@ -261,7 +261,7 @@ bool CheckDeclarator::visit(ObjCMethodPrototypeAST *ast)
if (ast->selector && ast->selector->asObjCSelectorWithArguments()) {
// TODO: add arguments (EV)
for (ObjCMessageArgumentDeclarationListAST *it = ast->arguments; it; it = it->next) {
for (ObjCMessageArgumentDeclarationListAST *it = ast->argument_list; it; it = it->next) {
ObjCMessageArgumentDeclarationAST *argDecl = it->value;
semantic()->check(argDecl, method->arguments());
......
......@@ -119,7 +119,7 @@ bool CheckExpression::visit(CastExpressionAST *ast)
bool CheckExpression::visit(ConditionAST *ast)
{
FullySpecifiedType typeSpecTy = semantic()->check(ast->type_specifiers, _scope);
FullySpecifiedType typeSpecTy = semantic()->check(ast->type_specifier_list, _scope);
Name *name = 0;
FullySpecifiedType declTy = semantic()->check(ast->declarator, typeSpecTy.qualifiedType(),
_scope, &name);
......@@ -205,9 +205,9 @@ bool CheckExpression::visit(NewExpressionAST *ast)
FullySpecifiedType typeIdTy = semantic()->check(ast->type_id, _scope);
if (ast->new_type_id) {
FullySpecifiedType ty = semantic()->check(ast->new_type_id->type_specifier, _scope);
FullySpecifiedType ty = semantic()->check(ast->new_type_id->type_specifier_list, _scope);
for (NewArrayDeclaratorListAST *it = ast->new_type_id->new_array_declarators; it; it = it->next) {
for (NewArrayDeclaratorListAST *it = ast->new_type_id->new_array_declarator_list; it; it = it->next) {
if (NewArrayDeclaratorAST *declarator = it->value) {
FullySpecifiedType exprTy = semantic()->check(declarator->expression, _scope);
}
......@@ -241,7 +241,7 @@ bool CheckExpression::visit(TypenameCallExpressionAST *ast)
bool CheckExpression::visit(TypeConstructorCallAST *ast)
{
FullySpecifiedType typeSpecTy = semantic()->check(ast->type_specifier, _scope);
FullySpecifiedType typeSpecTy = semantic()->check(ast->type_specifier_list, _scope);
for (ExpressionListAST *it = ast->expression_list; it; it = it->next) {
FullySpecifiedType exprTy = semantic()->check(it->value, _scope);
}
......@@ -251,7 +251,7 @@ bool CheckExpression::visit(TypeConstructorCallAST *ast)
bool CheckExpression::visit(PostfixExpressionAST *ast)
{
FullySpecifiedType exprTy = semantic()->check(ast->base_expression, _scope);
for (PostfixListAST *it = ast->postfix_expressions; it; it = it->next) {
for (PostfixListAST *it = ast->postfix_expression_list; it; it = it->next) {
accept(it->value); // ### not exactly.
}
return false;
......@@ -301,7 +301,7 @@ bool CheckExpression::visit(ThrowExpressionAST *ast)
bool CheckExpression::visit(TypeIdAST *ast)
{
FullySpecifiedType typeSpecTy = semantic()->check(ast->type_specifier, _scope);
FullySpecifiedType typeSpecTy = semantic()->check(ast->type_specifier_list, _scope);
FullySpecifiedType declTy = semantic()->check(ast->declarator, typeSpecTy.qualifiedType(),
_scope);
_fullySpecifiedType = declTy;
......
......@@ -139,7 +139,7 @@ Scope *CheckName::switchScope(Scope *scope)
bool CheckName::visit(QualifiedNameAST *ast)
{
std::vector<Name *> names;
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;
names.push_back(semantic()->check(nested_name_specifier->class_or_namespace_name, _scope));
}
......@@ -335,8 +335,8 @@ bool CheckName::visit(OperatorFunctionIdAST *ast)
bool CheckName::visit(ConversionFunctionIdAST *ast)
{
FullySpecifiedType ty = semantic()->check(ast->type_specifier, _scope);
ty = semantic()->check(ast->ptr_operators, ty, _scope);
FullySpecifiedType ty = semantic()->check(ast->type_specifier_list, _scope);
ty = semantic()->check(ast->ptr_operator_list, ty, _scope);
_name = control()->conversionNameId(ty);
return false;
}
......@@ -361,7 +361,7 @@ bool CheckName::visit(TemplateIdAST *ast)
{
Identifier *id = identifier(ast->identifier_token);
std::vector<FullySpecifiedType> templateArguments;
for (TemplateArgumentListAST *it = ast->template_arguments; it;
for (TemplateArgumentListAST *it = ast->template_argument_list; it;
it = it->next) {
ExpressionAST *arg = it->value;
FullySpecifiedType exprTy = semantic()->check(arg, _scope);
......@@ -390,7 +390,7 @@ bool CheckName::visit(ObjCSelectorWithoutArgumentsAST *ast)
bool CheckName::visit(ObjCSelectorWithArgumentsAST *ast)
{
std::vector<Name *> names;
for (ObjCSelectorArgumentListAST *it = ast->selector_arguments; it; it = it->next) {
for (ObjCSelectorArgumentListAST *it = ast->selector_argument_list; it; it = it->next) {
Identifier *id = identifier(it->value->name_token);
Name *name = control()->nameId(id);
......
......@@ -347,7 +347,7 @@ bool CheckSpecifier::visit(ClassSpecifierAST *ast)
int previousVisibility = semantic()->switchVisibility(visibility);
int previousMethodKey = semantic()->switchMethodKey(Function::NormalMethod);
for (DeclarationListAST *member = ast->member_specifiers; member; member = member->next) {
for (DeclarationListAST *member = ast->member_specifier_list; member; member = member->next) {
semantic()->check(member->value, klass->members());
}
......@@ -384,7 +384,7 @@ bool CheckSpecifier::visit(EnumSpecifierAST *ast)
e->setVisibility(semantic()->currentVisibility());
_scope->enterSymbol(e);
_fullySpecifiedType.setType(e);
for (EnumeratorListAST *it = ast->enumerators; it; it = it->next) {
for (EnumeratorListAST *it = ast->enumerator_list; it; it = it->next) {
EnumeratorAST *enumerator = it->value;
Identifier *id = identifier(enumerator->identifier_token);
if (! id)
......
......@@ -104,7 +104,7 @@ bool CheckStatement::visit(CompoundStatementAST *ast)
ast->symbol = block;
_scope->enterSymbol(block);
Scope *previousScope = switchScope(block->members());
for (StatementListAST *it = ast->statements; it; it = it->next) {
for (StatementListAST *it = ast->statement_list; it; it = it->next) {
semantic()->check(it->value, _scope);
}
(void) switchScope(previousScope);
......@@ -149,8 +149,8 @@ bool CheckStatement::visit(ForeachStatementAST *ast)
ast->symbol = block;
_scope->enterSymbol(block);
Scope *previousScope = switchScope(block->members());
if (ast->type_specifiers && ast->declarator) {
FullySpecifiedType ty = semantic()->check(ast->type_specifiers, _scope);
if (ast->type_specifier_list && ast->declarator) {
FullySpecifiedType ty = semantic()->check(ast->type_specifier_list, _scope);
Name *name = 0;
ty = semantic()->check(ast->declarator, ty, _scope, &name);
unsigned location = ast->declarator->firstToken();
......@@ -178,8 +178,8 @@ bool CheckStatement::visit(ObjCFastEnumerationAST *ast)
ast->symbol = block;
_scope->enterSymbol(block);
Scope *previousScope = switchScope(block->members());
if (ast->type_specifiers && ast->declarator) {
FullySpecifiedType ty = semantic()->check(ast->type_specifiers, _scope);
if (ast->type_specifier_list && ast->declarator) {
FullySpecifiedType ty = semantic()->check(ast->type_specifier_list, _scope);
Name *name = 0;
ty = semantic()->check(ast->declarator, ty, _scope, &name);
unsigned location = ast->declarator->firstToken();
......
This diff is collapsed.
This diff is collapsed.
......@@ -58,7 +58,7 @@ public:
Semantic sem(unit->control());
TranslationUnitAST *ast = unit->ast()->asTranslationUnit();
QVERIFY(ast);
for (DeclarationListAST *decl = ast->declarations; decl; decl = decl->next) {
for (DeclarationListAST *decl = ast->declaration_list; decl; decl = decl->next) {
sem.check(decl->value, globals);
}
}
......
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