objc- checking for objc decl context range is unreliable and

subject to change. Check for equality instead.

llvm-svn: 138238
This commit is contained in:
Fariborz Jahanian 2011-08-22 17:13:51 +00:00
parent 23e578c94a
commit 899c365257
1 changed files with 9 additions and 2 deletions

View File

@ -894,8 +894,15 @@ public:
} }
bool isObjCContainer() const { bool isObjCContainer() const {
return (DeclKind >= (int)Decl::ObjCCategory && switch (DeclKind) {
DeclKind <= (int)Decl::ObjCProtocol); case Decl::ObjCCategory:
case Decl::ObjCCategoryImpl:
case Decl::ObjCImplementation:
case Decl::ObjCInterface:
case Decl::ObjCProtocol:
return true;
}
return false;
} }
bool isFunctionOrMethod() const { bool isFunctionOrMethod() const {