aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-05-12 21:36:23 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-05-12 21:36:23 +0000
commit5d36ac2cc91125134fd8e1f0a0f1c2f888fb0566 (patch)
treeb84b797de7b12524f7c0b06154fd28ee83d98699 /lib/Sema/SemaDeclObjC.cpp
parent1426e534b4fca6a05b1120d634aae46be79ca17c (diff)
Method attributes may only be specified on method
declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71597 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 76e73fc650..d854f0b50c 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -1671,6 +1671,8 @@ Sema::DeclPtrTy Sema::ActOnMethodDeclaration(
PrevMethod = ImpDecl->getClassMethod(Context, Sel);
ImpDecl->addClassMethod(Context, ObjCMethod);
}
+ if (AttrList)
+ Diag(EndLoc, diag::warn_attribute_method_def);
}
else if (ObjCCategoryImplDecl *CatImpDecl =
dyn_cast<ObjCCategoryImplDecl>(ClassDecl)) {
@@ -1681,6 +1683,8 @@ Sema::DeclPtrTy Sema::ActOnMethodDeclaration(
PrevMethod = CatImpDecl->getClassMethod(Context, Sel);
CatImpDecl->addClassMethod(Context, ObjCMethod);
}
+ if (AttrList)
+ Diag(EndLoc, diag::warn_attribute_method_def);
}
if (PrevMethod) {
// You can never have two method definitions with the same name.