diff options
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r-- | lib/Sema/Sema.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index 8be821290b..2e6617be10 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -14,6 +14,7 @@ #include "Sema.h" #include "clang/AST/ASTContext.h" +#include "clang/AST/DeclObjC.h" #include "clang/AST/Expr.h" #include "clang/Lex/Preprocessor.h" #include "clang/Basic/Diagnostic.h" @@ -201,3 +202,7 @@ bool Sema::Diag(SourceLocation Range, unsigned DiagID, const std::string &Msg1, const LangOptions &Sema::getLangOptions() const { return PP.getLangOptions(); } + +ObjCMethodDecl *Sema::getCurMethodDecl() { + return dyn_cast<ObjCMethodDecl>(CurContext); +} |