summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2012-06-13 18:31:09 +0000
committerDaniel Jasper <djasper@google.com>2012-06-13 18:31:09 +0000
commit429c134d5d447168c828be8510f94193162887d2 (patch)
treed8a8984bca42e3ff9df9f60171593682692b018c /clang/lib/Sema/SemaDeclAttr.cpp
parentf0273603f5360708c28ae034e07b0b1c80a9d819 (diff)
downloadbcm5719-llvm-429c134d5d447168c828be8510f94193162887d2.tar.gz
bcm5719-llvm-429c134d5d447168c828be8510f94193162887d2.zip
Allow __attribute__((unused)) for fields and make it silence
-Wunused-private-field. llvm-svn: 158411
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-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 19ac6160c59..cf17af03410 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -1610,7 +1610,7 @@ static void handleUnusedAttr(Sema &S, Decl *D, const AttributeList &Attr) {
}
if (!isa<VarDecl>(D) && !isa<ObjCIvarDecl>(D) && !isFunctionOrMethod(D) &&
- !isa<TypeDecl>(D) && !isa<LabelDecl>(D)) {
+ !isa<TypeDecl>(D) && !isa<LabelDecl>(D) && !isa<FieldDecl>(D)) {
S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)
<< Attr.getName() << ExpectedVariableFunctionOrLabel;
return;
OpenPOWER on IntegriCloud