diff options
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/BasicStore.cpp | 2 | ||||
-rw-r--r-- | lib/Analysis/BugReporter.cpp | 7 | ||||
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 2 | ||||
-rw-r--r-- | lib/Analysis/CheckObjCDealloc.cpp | 4 | ||||
-rw-r--r-- | lib/Analysis/CheckObjCUnusedIVars.cpp | 2 |
5 files changed, 8 insertions, 9 deletions
diff --git a/lib/Analysis/BasicStore.cpp b/lib/Analysis/BasicStore.cpp index 7210d2c679..368345dfe4 100644 --- a/lib/Analysis/BasicStore.cpp +++ b/lib/Analysis/BasicStore.cpp @@ -517,7 +517,7 @@ Store BasicStoreManager::getInitialStore() { // Scan the method for ivar references. While this requires an // entire AST scan, the cost should not be high in practice. - St = scanForIvars(MD->getBody(getContext()), PD, St); + St = scanForIvars(MD->getBody(), PD, St); } } } diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp index 38ea458a65..3db96ca9ea 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/lib/Analysis/BugReporter.cpp @@ -146,7 +146,7 @@ public: ParentMap& getParentMap() { if (PM.get() == 0) - PM.reset(new ParentMap(getCodeDecl().getBody(getASTContext()))); + PM.reset(new ParentMap(getCodeDecl().getBody())); return *PM.get(); } @@ -182,8 +182,7 @@ PathDiagnosticBuilder::ExecutionContinues(const ExplodedNode<GRState>* N) { if (Stmt *S = GetNextStmt(N)) return PathDiagnosticLocation(S, getSourceManager()); - return FullSourceLoc(getCodeDecl().getBodyRBrace(getASTContext()), - getSourceManager()); + return FullSourceLoc(getCodeDecl().getBodyRBrace(), getSourceManager()); } PathDiagnosticLocation @@ -893,7 +892,7 @@ public: // statement (if it doesn't already exist). // FIXME: Should handle CXXTryStmt if analyser starts supporting C++. if (const CompoundStmt *CS = - PDB.getCodeDecl().getCompoundBody(PDB.getASTContext())) + PDB.getCodeDecl().getCompoundBody()) if (!CS->body_empty()) { SourceLocation Loc = (*CS->body_begin())->getLocStart(); rawAddEdge(PathDiagnosticLocation(Loc, PDB.getSourceManager())); diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index b25fdb330c..619dbe537d 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -2632,7 +2632,7 @@ CFRefLeakReport::getEndPath(BugReporterContext& BRC, if (!L.isValid()) { const Decl &D = BRC.getCodeDecl(); - L = PathDiagnosticLocation(D.getBodyRBrace(BRC.getASTContext()), SMgr); + L = PathDiagnosticLocation(D.getBodyRBrace(), SMgr); } std::string sbuf; diff --git a/lib/Analysis/CheckObjCDealloc.cpp b/lib/Analysis/CheckObjCDealloc.cpp index f50d7a19c4..e5f0485d8e 100644 --- a/lib/Analysis/CheckObjCDealloc.cpp +++ b/lib/Analysis/CheckObjCDealloc.cpp @@ -172,7 +172,7 @@ void clang::CheckObjCDealloc(ObjCImplementationDecl* D, } // dealloc found. Scan for missing [super dealloc]. - if (MD->getBody(Ctx) && !scan_dealloc(MD->getBody(Ctx), S)) { + if (MD->getBody() && !scan_dealloc(MD->getBody(), S)) { const char* name = LOpts.getGCMode() == LangOptions::NonGC ? "missing [super dealloc]" @@ -223,7 +223,7 @@ void clang::CheckObjCDealloc(ObjCImplementationDecl* D, // ivar must be released if and only if the kind of setter was not 'assign' bool requiresRelease = PD->getSetterKind() != ObjCPropertyDecl::Assign; - if(scan_ivar_release(MD->getBody(Ctx), ID, PD, RS, SelfII, Ctx) + if(scan_ivar_release(MD->getBody(), ID, PD, RS, SelfII, Ctx) != requiresRelease) { const char *name; const char* category = "Memory (Core Foundation/Objective-C)"; diff --git a/lib/Analysis/CheckObjCUnusedIVars.cpp b/lib/Analysis/CheckObjCUnusedIVars.cpp index a68c82fff9..bbcf90ec02 100644 --- a/lib/Analysis/CheckObjCUnusedIVars.cpp +++ b/lib/Analysis/CheckObjCUnusedIVars.cpp @@ -85,7 +85,7 @@ void clang::CheckObjCUnusedIvar(ObjCImplementationDecl* D, BugReporter& BR) { // Now scan the methods for accesses. for (ObjCImplementationDecl::instmeth_iterator I = D->instmeth_begin(Ctx), E = D->instmeth_end(Ctx); I!=E; ++I) - Scan(M, (*I)->getBody(Ctx)); + Scan(M, (*I)->getBody()); // Scan for @synthesized property methods that act as setters/getters // to an ivar. |