]> granicus.if.org Git - clang/commit
Added psuedo-constant analysis and integrated it into the false positive reduction...
authorTom Care <tom.care@uqconnect.edu.au>
Wed, 18 Aug 2010 21:17:24 +0000 (21:17 +0000)
committerTom Care <tom.care@uqconnect.edu.au>
Wed, 18 Aug 2010 21:17:24 +0000 (21:17 +0000)
commit245adabd97c8c770c13935a9075f2243cc6f1d57
treeabd01e8a0c55aba1aada82bd5925104b060f6472
parent5e1e89b8af283af34943a477dc6378f1a641df26
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
include/clang/Analysis/Analyses/PsuedoConstantAnalysis.h [new file with mode: 0644]
include/clang/Analysis/AnalysisContext.h
lib/Analysis/AnalysisContext.cpp
lib/Analysis/CMakeLists.txt
lib/Analysis/PsuedoConstantAnalysis.cpp [new file with mode: 0644]
lib/Checker/IdempotentOperationChecker.cpp
test/Analysis/constant-folding.c
test/Analysis/idempotent-operations.c
test/Analysis/null-deref-ps.c