summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commit2bd617c46c6e8a8940214bd0afe64a52b4fc59e8 (patch)
tree28257bfb5047fb33e6f4394731f18f038559d1b3 /clang/lib
parent2399628cea7b5e1aa9836a9077ce00ee2f76187a (diff)
downloadbcm5719-llvm-2bd617c46c6e8a8940214bd0afe64a52b4fc59e8.tar.gz
bcm5719-llvm-2bd617c46c6e8a8940214bd0afe64a52b4fc59e8.zip
Method attributes may only be specified on method
declarations. llvm-svn: 71597
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index 76e73fc650c..d854f0b50c6 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud