From 3c3af9c25b6e57dfc8c28a07679b90f902759a1a Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Fri, 18 Jun 2010 09:08:00 +0200 Subject: Fixed return-type checking for ObjC methods. --- src/shared/cplusplus/CheckDeclarator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/shared/cplusplus/CheckDeclarator.cpp') diff --git a/src/shared/cplusplus/CheckDeclarator.cpp b/src/shared/cplusplus/CheckDeclarator.cpp index 84edbd0292..8fb80549e6 100644 --- a/src/shared/cplusplus/CheckDeclarator.cpp +++ b/src/shared/cplusplus/CheckDeclarator.cpp @@ -260,7 +260,9 @@ bool CheckDeclarator::visit(ObjCMethodPrototypeAST *ast) return false; } - FullySpecifiedType returnType = semantic()->check(ast->type_name, _scope); + FullySpecifiedType returnType; + if (ast->type_name && ast->type_name->type_id) + returnType = semantic()->check(ast->type_name->type_id, _scope); unsigned location = ast->selector->firstToken(); -- cgit v1.2.1