[cfe-commits] r61476 - in /cfe/trunk: include/clang/AST/Attr.h lib/Sema/SemaDeclObjC.cpp
Fariborz Jahanian
fjahanian at apple.com
Mon Dec 29 11:57:17 PST 2008
Author: fjahanian
Date: Mon Dec 29 13:57:17 2008
New Revision: 61476
URL: http://llvm.org/viewvc/llvm-project?rev=61476&view=rev
Log:
Remove hasKind(). Use existing getKind().
Modified:
cfe/trunk/include/clang/AST/Attr.h
cfe/trunk/lib/Sema/SemaDeclObjC.cpp
Modified: cfe/trunk/include/clang/AST/Attr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Attr.h?rev=61476&r1=61475&r2=61476&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Attr.h (original)
+++ cfe/trunk/include/clang/AST/Attr.h Mon Dec 29 13:57:17 2008
@@ -68,10 +68,6 @@
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; }
Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=61476&r1=61475&r2=61476&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Mon Dec 29 13:57:17 2008
@@ -235,10 +235,10 @@
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();
}
More information about the cfe-commits
mailing list