Skip to content
  • Tom Care's avatar
    Added a path-sensitive idempotent operation checker... · 3ff08a8e
    Tom Care authored
    Added a path-sensitive idempotent operation checker (-analyzer-idempotent-operation). Finds idempotent and/or tautological operations in a path sensitive context, flagging operations that have no effect or a predictable effect.
    
    Example:
    {
    int a = 1;
    int b = 5;
    int c = b / a; // a is 1 on all paths
    }
    
    - New IdempotentOperationChecker class
    - Moved recursive Stmt functions in r107675 to IdempotentOperationChecker
    - Minor refactoring of SVal to allow checking for any integer
    - Added command line option for check
    - Added basic test cases
    
    llvm-svn: 107706
    3ff08a8e
Loading