]> granicus.if.org Git - clang/commit
Improvements to IdempotentOperationChecker and its use of PseudoConstantAnalysis
authorTom Care <tom.care@uqconnect.edu.au>
Tue, 24 Aug 2010 21:09:07 +0000 (21:09 +0000)
committerTom Care <tom.care@uqconnect.edu.au>
Tue, 24 Aug 2010 21:09:07 +0000 (21:09 +0000)
commitef52bcb606c73950139a775af61495f63fbc3603
treeaafe54f1a52e53ede92f8a8b945551bec366c92c
parent120d63cd4465230c2cd56508c7cd8e0ad00848e7
Improvements to IdempotentOperationChecker and its use of PseudoConstantAnalysis
- Added wasReferenced function to PseudoConstantAnalysis to determine if a variable was ever referenced in a function (outside of a self-assignment)
- BlockDeclRefExpr referenced variables are now explicitly added to the non-constant list
- Remove unnecessary ignore of implicit casts
- Generalized parameter self-assign detection to detect deliberate self-assigns of variables to avoid unused variable warnings
- Updated test cases with deliberate self-assignments
- Fixed bug with C++ references and pseudoconstants
- Added test case for C++ references and pseudoconstants

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111965 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Analysis/Analyses/PseudoConstantAnalysis.h
lib/Analysis/PseudoConstantAnalysis.cpp
lib/Checker/IdempotentOperationChecker.cpp
test/Analysis/dead-stores.c
test/Analysis/idempotent-operations.c
test/Analysis/idempotent-operations.cpp [new file with mode: 0644]
test/Analysis/rdar-6541136-region.c
test/Analysis/rdar-6541136.c