diff options
-rw-r--r-- | include/clang/AST/Attr.h | 4 | ||||
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/include/clang/AST/Attr.h b/include/clang/AST/Attr.h index 1af49f186f..9e9c858126 100644 --- a/include/clang/AST/Attr.h +++ b/include/clang/AST/Attr.h @@ -68,10 +68,6 @@ public: Kind getKind() const { return AttrKind; } - bool hasKind(Kind kind) const { - return AttrKind == kind; - } - Attr *getNext() { return Next; } const Attr *getNext() const { return Next; } void setNext(Attr *next) { Next = next; } diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 3f86e52e64..cf1a5259f2 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -235,10 +235,10 @@ Sema::FindProtocolDeclaration(bool WarnOnDeclarations, continue; } for (const Attr *attr = PDecl->getAttrs(); attr; attr = attr->getNext()) { - if (attr->hasKind(Attr::Unavailable)) + if (attr->getKind() == Attr::Unavailable) Diag(ProtocolId[i].second, diag::warn_unavailable) << PDecl->getDeclName(); - if (attr->hasKind(Attr::Deprecated)) + if (attr->getKind() == Attr::Deprecated) Diag(ProtocolId[i].second, diag::warn_deprecated) << PDecl->getDeclName(); } |