1) More additions for objective-c's qualifier type.
2) Fixed a test failure (which should have failed all along!).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43589 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/Sema.h b/Sema/Sema.h
index 32ab40d..0df8644 100644
--- a/Sema/Sema.h
+++ b/Sema/Sema.h
@@ -524,10 +524,11 @@
   virtual DeclTy *ActOnMethodDeclaration(
     SourceLocation BeginLoc, // location of the + or -.
     SourceLocation EndLoc,   // location of the ; or {.
-    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 MethodImplKind);
 
   // ActOnClassMessage - used for both unary and keyword messages.
diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp
index 66ece41..0d993b8 100644
--- a/Sema/SemaDecl.cpp
+++ b/Sema/SemaDecl.cpp
@@ -1288,6 +1288,9 @@
     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 @@
 
 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;