Skip to content
  1. Dec 16, 2009
    • Eli Friedman's avatar
      Add abort() as a builtin. This has two effects: one, we warn for incorrect · 53b3cde6
      Eli Friedman authored
      declarations of abort(), and two, we mark it noreturn.  Missing the latter
      shows up in one of the "embarassing" tests (from the thread on llvmdev
      "detailed comparison of generated code size for LLVM and other compilers").
      
      llvm-svn: 91515
      53b3cde6
    • Ted Kremenek's avatar
      Add (initial?) static analyzer support for handling C++ references. · 4cad5fc0
      Ted Kremenek authored
      This change was a lot bigger than I originally anticipated; among
      other things it requires us storing more information in the CFG to
      record what block-level expressions need to be evaluated as lvalues.
      
      The big change is that CFGBlocks no longer contain Stmt*'s by
      CFGElements.  Currently CFGElements just wrap Stmt*, but they also
      store a bit indicating whether the block-level expression should be
      evalauted as an lvalue.  DeclStmts involving the initialization of a
      reference require us treating the initialization expression as an
      lvalue, even though that information isn't recorded in the AST.
      Conceptually this change isn't that complicated, but it required
      bubbling up the data through the CFGBuilder, to GRCoreEngine, and
      eventually to GRExprEngine.
      
      The addition of CFGElement is also useful for when we want to handle
      more control-flow constructs or other data we want to keep in the CFG
      that isn't represented well with just a block of statements.
      
      In GRExprEngine, this patch introduces logic for evaluating the
      lvalues of references, which currently retrieves the internal "pointer
      value" that the reference represents.  EvalLoad does a two stage load
      to catch null dereferences involving an invalid reference (although
      this could possibly be caught earlier during the initialization of a
      reference).
      
      Symbols are currently symbolicated using the reference type, instead
      of a pointer type, and special handling is required creating
      ElementRegions that layer on SymbolicRegions (see the changes to
      RegionStoreManager).
      
      Along the way, the DeadStoresChecker also silences warnings involving
      dead stores to references.  This was the original change I introduced
      (which I wrote test cases for) that I realized caused GRExprEngine to
      crash.
      
      llvm-svn: 91501
      4cad5fc0
  2. Dec 15, 2009
  3. Dec 14, 2009
  4. Dec 12, 2009
  5. Dec 11, 2009
  6. Dec 10, 2009
  7. Dec 09, 2009
  8. Dec 06, 2009
  9. Dec 03, 2009
  10. Dec 02, 2009
  11. Dec 01, 2009
  12. Nov 29, 2009
  13. Nov 26, 2009
  14. Nov 25, 2009
  15. Nov 24, 2009
    • Ted Kremenek's avatar
      Convert test case to FileCheck to test the behavior of the nil-receiver... · 239b930a
      Ted Kremenek authored
      Convert test case to FileCheck to test the behavior of the nil-receiver checker when the code is targetted for either Tiger or Leopard.
      
      llvm-svn: 89810
      239b930a
    • Ted Kremenek's avatar
      For the nil-receiver checker, take into account the behavioral changes that... · 1fc1f20e
      Ted Kremenek authored
      For the nil-receiver checker, take into account the behavioral changes that got introduced in Mac OS X 10.5 and later, notably return values of double, float, etc., will not be garbage.  Fixes <rdar://problem/6829160>.
      
      llvm-svn: 89809
      1fc1f20e
    • Ted Kremenek's avatar
      Cleanups and fixes to the nil-receiver checker, some of it fallout the · 005e8a06
      Ted Kremenek authored
      initial transition of the nil-receiver checker to the Checker
      interface as done in r89745.  Some important changes include:
      
      1) We consolidate the BugType object used for nil receiver bug
      reports, and don't include the type of the returned value in the
      BugType (which would be wrong if a nil receiver bug was reported more
      than once)
      
      2) Added a new (temporary) flag to CheckerContext: DoneEvauating.
      This is used by GRExprEngine when evaluating message expressions to
      not continue evaluating the message expression if this flag is set.
      This flag is currently set by the nil receiver checker.  This is an
      intermediate solution to allow the nil-receiver checker to properly
      work as a plug-in outside of GRExprEngine.  Basically, this flag
      indicates that the entire message expression has been evaluated, not
      just a precondition (which is what the nil-receiver checker does).
      This flag *should not* be repurposed for general use, but just to pull
      more things out of GRExprEngine that already in there as we devise a
      better interface in the Checker class.
      
      3) Cleaned up the logic in the nil-receiver checker, making the
      control-flow a lot easier to read.
      
      llvm-svn: 89804
      005e8a06
    • Ted Kremenek's avatar
      Enhance null dereference diagnostics by indicating what variable (if any) was... · c0229557
      Ted Kremenek authored
      Enhance null dereference diagnostics by indicating what variable (if any) was dereferenced.  Addresses <rdar://problem/7039161>.
      
      llvm-svn: 89726
      c0229557
  16. Nov 23, 2009
  17. Nov 22, 2009
  18. Nov 21, 2009
  19. Nov 20, 2009
Loading