Skip to content
Snippets Groups Projects
  1. Jul 11, 2014
  2. Jul 10, 2014
    • Jordan Rose's avatar
      [analyzer] Check for code testing a variable for 0 after using it as a denominator. · 00a1ef80
      Jordan Rose authored
      This new checker, alpha.core.TestAfterDivZero, catches issues like this:
      
        int sum = ...
        int avg = sum / count; // potential division by zero...
        if (count == 0) { ... } // ...caught here
      
      Because the analyzer does not necessarily explore /all/ paths through a program,
      this check is restricted to only work on zero checks that immediately follow a
      division operation (/ % /= %=). This could later be expanded to handle checks
      dominated by a division operation but not necessarily in the same CFG block.
      
      Patch by Anders Rönnholm! (with very minor modifications by me)
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212731 91177308-0d34-0410-b5e6-96231b3b80d8
      00a1ef80
  3. Jul 08, 2014
  4. Jul 07, 2014
  5. Jul 06, 2014
  6. Jul 05, 2014
  7. Jun 29, 2014
  8. Jun 27, 2014
    • Anna Zaks's avatar
      Do not inline methods of C++ containers (coming from headers). · a3911af7
      Anna Zaks authored
      This silences false positives (leaks, use of uninitialized value) in simple
      code that uses containers such as std::vector and std::list. The analyzer
      cannot reason about the internal invariances of those data structures which
      leads to false positives. Until we come up with a better solution to that
      problem, let's just not inline the methods of the containers and allow objects
      to escape whenever such methods are called.
      
      This just extends an already existing flag "c++-container-inlining" and applies
      the heuristic not only to constructors and destructors of the containers, but
      to all of their methods.
      
      We have a bunch of distinct user reports all related to this issue
      (radar://16058651, radar://16580751, radar://16384286, radar://16795491
      [PR19637]).
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211832 91177308-0d34-0410-b5e6-96231b3b80d8
      a3911af7
  9. Jun 26, 2014
  10. Jun 25, 2014
  11. Jun 23, 2014
  12. Jun 22, 2014
  13. Jun 18, 2014
  14. Jun 17, 2014
  15. Jun 14, 2014
  16. Jun 12, 2014
  17. Jun 10, 2014
  18. Jun 03, 2014
  19. May 28, 2014
  20. May 27, 2014
  21. May 23, 2014
  22. May 20, 2014
  23. May 15, 2014
  24. May 11, 2014
  25. May 10, 2014
  26. May 07, 2014
  27. May 06, 2014
Loading