aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Analysis
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-08-03 03:13:46 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-08-03 03:13:46 +0000
commitc471e7b44e63ff1b46b480e723c4130aeaef5a8a (patch)
treea7b526862868e3470b67e12764f36834371ebfdd /include/clang/Analysis
parent2e3124486f343d770a2a5c2b7e78268bfc328a58 (diff)
Create only one AnalysisManager for each translation unit. In HandleCode(),
reset the current analysis context of the AnalysisManager. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis')
-rw-r--r--include/clang/Analysis/PathSensitive/AnalysisManager.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Analysis/PathSensitive/AnalysisManager.h b/include/clang/Analysis/PathSensitive/AnalysisManager.h
index e7371de656..2cff088ee0 100644
--- a/include/clang/Analysis/PathSensitive/AnalysisManager.h
+++ b/include/clang/Analysis/PathSensitive/AnalysisManager.h
@@ -75,6 +75,10 @@ public:
CurrentContext = 0;
}
+
+ void setContext(Decl *D) {
+ CurrentContext = ContextMgr.getContext(D);
+ }
Decl *getCodeDecl() const {
assert (AScope == ScopeDecl);