From: Fariborz Jahanian Date: Mon, 29 Dec 2008 19:57:17 +0000 (+0000) Subject: Remove hasKind(). Use existing getKind(). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fc820a4394a33e4fccfd8283909d425708311d41;p=clang Remove hasKind(). Use existing getKind(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61476 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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(); }