summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-02-25 03:26:51 +0000
committerTed Kremenek <kremenek@apple.com>2010-02-25 03:26:51 +0000
commit6bf658abefb9e05c7fd70dbb97d3efacaa67b32a (patch)
tree88dc03163641937840465f2769432e85ca23bbaa /clang/lib
parent12ee380a61ce63a2d405e493799604365a5ea748 (diff)
downloadbcm5719-llvm-6bf658abefb9e05c7fd70dbb97d3efacaa67b32a.tar.gz
bcm5719-llvm-6bf658abefb9e05c7fd70dbb97d3efacaa67b32a.zip
Allow __attribute__((unused)) to be applied to ObjC ivars.
llvm-svn: 97103
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index 8a8ad28def2..242d66fa521 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -521,7 +521,7 @@ static void HandleUnusedAttr(Decl *d, const AttributeList &Attr, Sema &S) {
return;
}
- if (!isa<VarDecl>(d) && !isFunctionOrMethod(d)) {
+ if (!isa<VarDecl>(d) && !isa<ObjCIvarDecl>(d) && !isFunctionOrMethod(d)) {
S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)
<< Attr.getName() << 2 /*variable and function*/;
return;
OpenPOWER on IntegriCloud