aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/UnreachableCodeChecker.cpp
AgeCommit message (Collapse)Author
2010-12-22[analyzer] Refactoring: lib/Checker -> lib/GR and libclangChecker -> ↵Argyrios Kyrtzidis
libclangGRCore git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122421 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-22[analyzer] Refactoring: include/clang/Checker -> include/clang/GRArgyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122420 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-06UnreachableCodeChecker cleanup and improvementsTom Care
- Fixed some iterator style issues - Don't process blocks that have been visited already - Fixed a case where a unreachable block cycle was not reported - Minor test case changes - Added one test case from flow-sensitive version of the check. More coming. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115861 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-01UnreachableCodeChecker does not need to inherit from CheckerVisitor, only ↵Tom Care
Checker. It does not use any AST Stmt hooks, only VisitEndAnalysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115345 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-16Introduce new CFGElement hierarchy to support C++ CFG, based on Marcin's patchZhongxing Xu
and discussions with Ted and Jordy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114056 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-27Remove an assertion in UnreachableCodeChecker that can be triggered by bugs ↵Tom Care
in other checkers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112310 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12Small changes to UnreachableCodeCheckerTom Care
- Added detection of Empty CFGBlocks (artificial blocks) - Relaxed an assertion based on an incorrect assumption until further investigation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110974 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05Fixed logic error in UnreachableCodeChecker's marking algorithm that would ↵Tom Care
sometimes allow for multiple sequential statements to be flagged. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110353 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-03Improved false positive detection and numerous small issues in ↵Tom Care
UnreachableCodeChecker - Reporting now uses getUnreachableStmt which returns the Stmt* we should report - Indexing of reachable and visited blocks now use CFGBlock ID's instead of pointers - The CFG used in the unreachable search is now the unoptimized CFG - Added 'Dead code' category to warnings - Removed obsolete function getCondition - Simplified false positive detection based on properties of FindUnreachableEntryPoints git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110148 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-03Changed GRExprEngine to pass down a reference to itself when checkers are ↵Tom Care
doing postanalysis. This allows the checker to gather information about the state of the engine when it has finished. - Exposed the worklist and BlockAborted flag in GRCoreEngine - Changed postanalysis checkers to use the new infrastructure git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110095 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-27Added some false positive checking to UnreachableCodeCheckerTom Care
- Allowed reporting of dead macros - Added path walking function to search for false positives in conditional statements - Updated some affected tests - Added some false positive test cases git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109561 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-27Don't warn about unreachable code if the block starts with ↵Jordy Rose
__builtin_unreachable(). The next step is to warn if a block labeled unreachable is, in fact, reachable. Somewhat related to PR810. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109487 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23Added an path-sensitive unreachable code checker to the experimental ↵Tom Care
analyzer checks. - Created a new class to do post-analysis - Updated several test cases with unreachable code to expect a warning - Added some general tests git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109286 91177308-0d34-0410-b5e6-96231b3b80d8