aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Analysis/AnalysisContext.h
diff options
context:
space:
mode:
authorTom Care <tom.care@uqconnect.edu.au>2010-08-18 21:17:24 +0000
committerTom Care <tom.care@uqconnect.edu.au>2010-08-18 21:17:24 +0000
commit245adabd97c8c770c13935a9075f2243cc6f1d57 (patch)
treeabd01e8a0c55aba1aada82bd5925104b060f6472 /include/clang/Analysis/AnalysisContext.h
parent5e1e89b8af283af34943a477dc6378f1a641df26 (diff)
Added psuedo-constant analysis and integrated it into the false positive reduction stage in IdempotentOperationChecker.
- Renamed IdempotentOperationChecker::isConstant to isConstantOrPseudoConstant to better reflect the function - Changed IdempotentOperationChecker::PreVisitBinaryOperator to only run 'CanVary' once on undefined assumptions - Created new PsuedoConstantAnalysis class and added it to AnalysisContext - Changed IdempotentOperationChecker to exploit the new analysis - Updated tests with psuedo-constants - Added check to IdempotentOperationChecker to see if a Decl is const qualified git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111426 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis/AnalysisContext.h')
-rw-r--r--include/clang/Analysis/AnalysisContext.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/clang/Analysis/AnalysisContext.h b/include/clang/Analysis/AnalysisContext.h
index 2b595b99cb..124a08e073 100644
--- a/include/clang/Analysis/AnalysisContext.h
+++ b/include/clang/Analysis/AnalysisContext.h
@@ -30,6 +30,7 @@ class CFG;
class CFGBlock;
class LiveVariables;
class ParentMap;
+class PsuedoConstantAnalysis;
class ImplicitParamDecl;
class LocationContextManager;
class StackFrameContext;
@@ -49,6 +50,7 @@ class AnalysisContext {
bool builtCFG, builtCompleteCFG;
LiveVariables *liveness;
ParentMap *PM;
+ PsuedoConstantAnalysis *PCA;
llvm::DenseMap<const BlockDecl*,void*> *ReferencedBlockVars;
llvm::BumpPtrAllocator A;
bool UseUnoptimizedCFG;
@@ -59,7 +61,7 @@ public:
bool addehedges = false)
: D(d), TU(tu), cfg(0), completeCFG(0),
builtCFG(false), builtCompleteCFG(false),
- liveness(0), PM(0),
+ liveness(0), PM(0), PCA(0),
ReferencedBlockVars(0), UseUnoptimizedCFG(useUnoptimizedCFG),
AddEHEdges(addehedges) {}
@@ -85,6 +87,7 @@ public:
CFG *getUnoptimizedCFG();
ParentMap &getParentMap();
+ PsuedoConstantAnalysis *getPsuedoConstantAnalysis();
LiveVariables *getLiveVariables();
typedef const VarDecl * const * referenced_decls_iterator;