diff options
Diffstat (limited to 'Sema/SemaDecl.cpp')
-rw-r--r-- | Sema/SemaDecl.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp index 66ece4149a..0d993b8fcc 100644 --- a/Sema/SemaDecl.cpp +++ b/Sema/SemaDecl.cpp @@ -1288,6 +1288,9 @@ void Sema::CheckImplementationIvars(ObjcImplementationDecl *ImpDecl, IDecl->addInstanceVariablesToClass(ivars, numIvars, RBrace); return; } + // If implementation has empty ivar list, just return. + if (numIvars == 0) + return; assert(ivars && "missing @implementation ivars"); @@ -1967,10 +1970,11 @@ void Sema::ActOnAddMethodsToObjcDecl(Scope* S, DeclTy *classDecl, Sema::DeclTy *Sema::ActOnMethodDeclaration( SourceLocation MethodLoc, SourceLocation EndLoc, - tok::TokenKind MethodType, TypeTy *ReturnType, Selector Sel, + tok::TokenKind MethodType, ObjcDeclSpec &ReturnQT, TypeTy *ReturnType, + Selector Sel, // optional arguments. The number of types/arguments is obtained // from the Sel.getNumArgs(). - TypeTy **ArgTypes, IdentifierInfo **ArgNames, + ObjcDeclSpec *ArgQT, TypeTy **ArgTypes, IdentifierInfo **ArgNames, AttributeList *AttrList, tok::ObjCKeywordKind MethodDeclKind) { llvm::SmallVector<ParmVarDecl*, 16> Params; |