aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-08-11 05:35:13 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-08-11 05:35:13 +0000
commitc4a1dea2dc56bd1357ec91b829a0b9e68229a13e (patch)
treec2cae8e66f75f756c628362ad21990809f3a7a7a /lib/Sema/Sema.cpp
parentde7fb8413b13651fd85b7125d08b3c9ac2816d9d (diff)
More #include cleaning
- Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h - Moved Sema::getCurMethodDecl() out of line (dependent on ObjCMethodDecl via dyn_cast). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54629 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r--lib/Sema/Sema.cpp5
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);
+}