aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/DeclBase.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index dfe43f4086..b407701a7e 100644
--- a/include/clang/AST/DeclBase.h
+++ b/include/clang/AST/DeclBase.h
@@ -894,8 +894,15 @@ public:
}
bool isObjCContainer() const {
- return (DeclKind >= (int)Decl::ObjCCategory &&
- DeclKind <= (int)Decl::ObjCProtocol);
+ switch (DeclKind) {
+ case Decl::ObjCCategory:
+ case Decl::ObjCCategoryImpl:
+ case Decl::ObjCImplementation:
+ case Decl::ObjCInterface:
+ case Decl::ObjCProtocol:
+ return true;
+ }
+ return false;
}
bool isFunctionOrMethod() const {