diff options
Diffstat (limited to 'include/clang/AST/DeclObjC.h')
-rw-r--r-- | include/clang/AST/DeclObjC.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index 4ae073ec46..93441d2e83 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -150,6 +150,15 @@ private: /// "standard" position, a enum SelectorLocationsKind. unsigned SelLocsKind : 2; + /// \brief Whether this method overrides any other in the class hierarchy. + /// + /// A method is said to override any method in the class's + /// base classes, its protocols, or its categories' protocols, that has + /// the same selector and is of the same kind (class or instance). + /// A method in an implementation is not considered as overriding the same + /// method in the interface or its categories. + unsigned IsOverriding : 1; + // Result type of this method. QualType MethodDeclType; @@ -230,7 +239,7 @@ private: IsDefined(isDefined), IsRedeclaration(0), HasRedeclaration(0), DeclImplementation(impControl), objcDeclQualifier(OBJC_TQ_None), RelatedResultType(HasRelatedResultType), - SelLocsKind(SelLoc_StandardNoSpace), + SelLocsKind(SelLoc_StandardNoSpace), IsOverriding(0), MethodDeclType(T), ResultTInfo(ResultTInfo), ParamsAndSelLocs(0), NumParams(0), EndLoc(endLoc), Body(0), SelfDecl(0), CmdDecl(0) { @@ -396,6 +405,16 @@ public: bool isDefined() const { return IsDefined; } void setDefined(bool isDefined) { IsDefined = isDefined; } + /// \brief Whether this method overrides any other in the class hierarchy. + /// + /// A method is said to override any method in the class's + /// base classes, its protocols, or its categories' protocols, that has + /// the same selector and is of the same kind (class or instance). + /// A method in an implementation is not considered as overriding the same + /// method in the interface or its categories. + bool isOverriding() const { return IsOverriding; } + void setOverriding(bool isOverriding) { IsOverriding = isOverriding; } + // Related to protocols declared in @protocol void setDeclImplementation(ImplementationControl ic) { DeclImplementation = ic; |