Skip to content
  1. Nov 01, 2012
  2. Oct 31, 2012
  3. Oct 30, 2012
  4. Oct 29, 2012
    • Anna Zaks's avatar
      [analyzer] Malloc checker cleanup/refactor · 58a2c4e4
      Anna Zaks authored
      No need for the auxiliary flag. No need to generate a leak node when
      there is no error.
      
      llvm-svn: 166977
      58a2c4e4
    • Anna Zaks's avatar
      [analyzer] Add SimpleStreamChecker. · be70d4d0
      Anna Zaks authored
      This is an example checker for catching fopen fclose API misuses.
      
      llvm-svn: 166976
      be70d4d0
    • Anna Zaks's avatar
      [analyzer] Add checker helpers to CheckerContext. · 2ab0321b
      Anna Zaks authored
      - Adding Immutable Map to GDM and getIdentifierInfo helper method.
      
      llvm-svn: 166975
      2ab0321b
    • Jordan Rose's avatar
      [analyzer] New option to not suppress null return paths if an argument is null. · ec44ac6a
      Jordan Rose authored
      Our one basic suppression heuristic is to assume that functions do not
      usually return NULL. However, when one of the arguments is NULL it is
      suddenly much more likely that NULL is a valid return value. In this case,
      we don't suppress the report here, but we do attach /another/ visitor to
      go find out if this NULL argument also comes from an inlined function's
      error path.
      
      This new behavior, controlled by the 'avoid-suppressing-null-argument-paths'
      analyzer-config option, is turned off by default. Turning it on produced
      two false positives and no new true positives when running over LLVM/Clang.
      
      This is one of the possible refinements to our suppression heuristics.
      <rdar://problem/12350829>
      
      llvm-svn: 166941
      ec44ac6a
    • Jordan Rose's avatar
      [analyzer] Use the CallEnter node to get a value for tracked null arguments. · 199fdd82
      Jordan Rose authored
      Additionally, don't collect PostStore nodes -- they are often used in
      path diagnostics.
      
      Previously, we tried to track null arguments in the same way as any other
      null values, but in many cases the necessary nodes had already been
      collected (a memory optimization in ExplodedGraph). Now, we fall back to
      using the value of the argument at the time of the call, which may not
      always match the actual contents of the region, but often will.
      
      This is a precursor to improving our suppression heuristic.
      <rdar://problem/12350829>
      
      llvm-svn: 166940
      199fdd82
  5. Oct 26, 2012
  6. Oct 24, 2012
  7. Oct 20, 2012
    • Jordan Rose's avatar
      [analyzer] Assume 'new' never returns NULL if it could throw an exception. · 3957fd58
      Jordan Rose authored
      This is actually required by the C++ standard in
      [basic.stc.dynamic.allocation]p3:
      
        If an allocation function declared with a non-throwing
        exception-specification fails to allocate storage, it shall return a
        null pointer. Any other allocation function that fails to allocate
        storage shall indicate failure only by throwing an exception of a type
        that would match a handler of type std::bad_alloc.
      
      We don't bother checking for the specific exception type, but just go off
      the operator new prototype. This should help with a certain class of lazy
      initalization false positives.
      
      <rdar://problem/12115221>
      
      llvm-svn: 166363
      3957fd58
  8. Oct 18, 2012
  9. Oct 17, 2012
    • Jordan Rose's avatar
      [analyzer] When binding to a ParenExpr, bind to its inner expression instead. · 8e785e21
      Jordan Rose authored
      This actually looks through several kinds of expression, such as
      OpaqueValueExpr and ExprWithCleanups. The idea is that binding and lookup
      should be consistent, and so if the environment needs to be modified later,
      the code doing the modification will not have to manually look through these
      "transparent" expressions to find the real binding to change.
      
      This is necessary for proper updating of struct rvalues as described in
      the previous commit.
      
      llvm-svn: 166121
      8e785e21
    • Jordan Rose's avatar
      [analyzer] Create a temporary region when accessing a struct rvalue. · 29fc261c
      Jordan Rose authored
      In C++, rvalues that need to have their address taken (for example, to be
      passed to a function by const reference) will be wrapped in a
      MaterializeTemporaryExpr, which lets CodeGen know to create a temporary
      region to store this value. However, MaterializeTemporaryExprs are /not/
      created when a method is called on an rvalue struct, even though the 'this'
      pointer needs a valid value. CodeGen works around this by creating a
      temporary region anyway; now, so does the analyzer.
      
      The analyzer also does this when accessing a field of a struct rvalue.
      This is a little unfortunate, since the rest of the struct will soon be
      thrown away, but it does make things consistent with the rest of the
      analyzer.
      
      This allows us to bring back the assumption that all known 'this' values
      are Locs. This is a revised version of r164828-9, reverted in r164876-7.
      
      <rdar://problem/12137950>
      
      llvm-svn: 166120
      29fc261c
  10. Oct 16, 2012
  11. Oct 13, 2012
  12. Oct 11, 2012
Loading