diff options
Diffstat (limited to 'include/clang/AST/DeclObjC.h')
-rw-r--r-- | include/clang/AST/DeclObjC.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index ad9b5a26b7c86..f5098f06a9f64 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -394,7 +394,7 @@ public: /// createImplicitParams - Used to lazily create the self and cmd /// implict parameters. This must be called prior to using getSelfDecl() - /// or getCmdDecl(). The call is ignored if the implicit paramters + /// or getCmdDecl(). The call is ignored if the implicit parameters /// have already been created. void createImplicitParams(ASTContext &Context, const ObjCInterfaceDecl *ID); @@ -463,6 +463,9 @@ public: ImplementationControl getImplementationControl() const { return ImplementationControl(DeclImplementation); } + bool isOptional() const { + return getImplementationControl() == Optional; + } /// Returns true if this specific method declaration is marked with the /// designated initializer attribute. @@ -870,6 +873,9 @@ public: PropertyControl getPropertyImplementation() const { return PropertyControl(PropertyImplementation); } + bool isOptional() const { + return getPropertyImplementation() == PropertyControl::Optional; + } void setPropertyIvarDecl(ObjCIvarDecl *Ivar) { PropertyIvarDecl = Ivar; |