From e609e9a70176d5cad7c823f60ab2a7f736d32e41 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 23 Feb 2010 17:43:40 +0100 Subject: Simplified ObjC selectors in the AST. --- src/shared/cplusplus/CheckDeclarator.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/shared/cplusplus/CheckDeclarator.cpp') diff --git a/src/shared/cplusplus/CheckDeclarator.cpp b/src/shared/cplusplus/CheckDeclarator.cpp index 860e7d3078..688fc405b2 100644 --- a/src/shared/cplusplus/CheckDeclarator.cpp +++ b/src/shared/cplusplus/CheckDeclarator.cpp @@ -263,7 +263,7 @@ bool CheckDeclarator::visit(ObjCMethodPrototypeAST *ast) semantic()->check(ast->selector, _scope); - ObjCMethod *method = control()->newObjCMethod(location, ast->selector->selector_name); + ObjCMethod *method = control()->newObjCMethod(location, ast->selector->name); ast->symbol = method; method->setScope(_scope); method->setVisibility(semantic()->currentVisibility()); @@ -271,17 +271,15 @@ bool CheckDeclarator::visit(ObjCMethodPrototypeAST *ast) if (semantic()->isObjCClassMethod(tokenKind(ast->method_type_token))) method->setStorage(Symbol::Static); - if (ast->selector->asObjCSelectorWithArguments()) { - for (ObjCMessageArgumentDeclarationListAST *it = ast->argument_list; it; it = it->next) { - ObjCMessageArgumentDeclarationAST *argDecl = it->value; + for (ObjCMessageArgumentDeclarationListAST *it = ast->argument_list; it; it = it->next) { + ObjCMessageArgumentDeclarationAST *argDecl = it->value; - semantic()->check(argDecl, method->arguments()); - } - - if (ast->dot_dot_dot_token) - method->setVariadic(true); + semantic()->check(argDecl, method->arguments()); } + if (ast->dot_dot_dot_token) + method->setVariadic(true); + _fullySpecifiedType = FullySpecifiedType(method); return false; -- cgit v1.2.1