Sema support for format and noreturn attributes on Objective-C methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56640 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index dbb3cf2..1b166c4 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -978,8 +978,6 @@
                            MethodDeclKind == tok::objc_optional ? 
                            ObjCMethodDecl::Optional : 
                            ObjCMethodDecl::Required);
-  if (AttrList)
-    ProcessDeclAttributeList(ObjCMethod, AttrList);
   
   llvm::SmallVector<ParmVarDecl*, 16> Params;
   
@@ -1004,6 +1002,9 @@
   ObjCMethod->setObjCDeclQualifier(
     CvtQTToAstBitMask(ReturnQT.getObjCDeclQualifier()));
   const ObjCMethodDecl *PrevMethod = 0;
+
+  if (AttrList)
+    ProcessDeclAttributeList(ObjCMethod, AttrList);
  
   // For implementations (which can be very "coarse grain"), we add the 
   // method now. This allows the AST to implement lookup methods that work