Skip to content
  1. Feb 08, 2010
  2. Feb 05, 2010
  3. Feb 04, 2010
  4. Jan 25, 2010
    • Ted Kremenek's avatar
      Split libAnalysis into two libraries: libAnalysis and libChecker. · d6b87086
      Ted Kremenek authored
      (1) libAnalysis is a generic analysis library that can be used by
          Sema.  It defines the CFG, basic dataflow analysis primitives, and
          inexpensive flow-sensitive analyses (e.g. LiveVariables).
      
      (2) libChecker contains the guts of the static analyzer, incuding the
          path-sensitive analysis engine and domain-specific checks.
      
      Now any clients that want to use the frontend to build their own tools
      don't need to link in the entire static analyzer.
      
      This change exposes various obvious cleanups that can be made to the
      layout of files and headers in libChecker.  More changes pending.  :)
      
      This change also exposed a layering violation between AnalysisContext
      and MemRegion.  BlockInvocationContext shouldn't explicitly know about
      BlockDataRegions.  For now I've removed the BlockDataRegion* from
      BlockInvocationContext (removing context-sensitivity; although this
      wasn't used yet).  We need to have a better way to extend
      BlockInvocationContext (and any LocationContext) to add
      context-sensitivty.
      
      llvm-svn: 94406
      d6b87086
  5. Dec 17, 2009
  6. Dec 16, 2009
  7. Dec 07, 2009
    • Ted Kremenek's avatar
      Add analysis support for blocks. This includes a few key changes: · 04af9f20
      Ted Kremenek authored
      - Refactor the MemRegion hierarchy to distinguish between different StackSpaceRegions for locals and parameters.
      - VarRegions for "captured" variables now have the BlockDataRegion as their super region (except those passed by reference)
      - Add transfer function support to GRExprEngine for BlockDeclRefExprs.
      
      This change also supports analyzing blocks as an analysis entry point
      (top-of-the-stack), which required pushing more context-sensitivity
      around in the MemRegion hierarchy via the use of LocationContext
      objects.  Functionally almost everything is the same, except we track
      LocationContexts in a few more areas and StackSpaceRegions now refer
      to a StackFrameContext object.  In the future we will need to modify
      MemRegionManager to allow multiple StackSpaceRegions in flight at once
      (for the analysis of multiple stack frames).
      
      llvm-svn: 90809
      04af9f20
  8. Dec 04, 2009
  9. Nov 28, 2009
  10. Nov 16, 2009
    • Zhongxing Xu's avatar
      * Do the same thing to the basicstore as in r84163. · 731f4626
      Zhongxing Xu authored
      * Add a load type to GRExprEngine::EvalLoad().
      * When retrieve from 'theValue' of OSAtomic funcitions, use the type of the 
        region instead of the argument expression as the load type.
      * Then we can convert CastRetrievedSVal to a pure assertion. In the future
        we can let all Retrieve() methods simply return SVal.
      
      llvm-svn: 88888
      731f4626
  11. Nov 10, 2009
  12. Nov 04, 2009
  13. Oct 16, 2009
  14. Oct 14, 2009
  15. Sep 27, 2009
    • Ted Kremenek's avatar
      Fix: · e41b81e9
      Ted Kremenek authored
      <rdar://problem/6914474> checker doesn't realize that variable might
      have been assigned if a pointer to that variable was passed to another
      function via a structure
      
      The problem here was the RegionStoreManager::InvalidateRegion didn't
      invalidate the bindings of invalidated regions.  This required a
      rewrite of this method using a worklist.
      
      As part of this fix, changed ValueManager::getConjuredSymbolVal() to
      require a 'void*' SymbolTag argument.  This tag is used to
      differentiate two different symbols created at the same location.
      
      llvm-svn: 82920
      e41b81e9
  16. Sep 12, 2009
    • Ted Kremenek's avatar
      Introduce "DefinedOrUnknownSVal" into the SVal class hierarchy, providing a way · 7020eae0
      Ted Kremenek authored
      to statically type various methods in SValuator/GRState as required either a
      defined value or a defined-but-possibly-unknown value. This leads to various
      logic cleanups in GRExprEngine, and lets the compiler enforce via type checking
      our assumptions about what symbolic values are possibly undefined and what are
      not.
      
      Along the way, clean up some of the static analyzer diagnostics regarding the uses of uninitialized values.
      
      llvm-svn: 81579
      7020eae0
  17. Sep 09, 2009
  18. Aug 26, 2009
  19. Aug 25, 2009
  20. Aug 23, 2009
  21. Aug 22, 2009
    • Ted Kremenek's avatar
      Remove 'SelfRegion' field from both BasicStoreManager and RegionStoreManager. · 608677a2
      Ted Kremenek authored
      SelfRegion represented the object bound to 'self' (when analyzing Objective-C
      methods) upon entry to a method. Having this region stored on the side ignores
      the current stack frame that we might be analyzing (among other things), and is
      a problem for interprocedural analysis.
      
      For RegionStoreManager, the value for SelfRegion is just lazily created.
      
      For BasicStoreManager, the value for SelfRegion is bound eagerly to 'self', but
      no explicit tracking of SelfRegion on the side is made.
      
      As part of this change, remove the restriction in BasicStoreManager that we only
      track ivars for 'self'. This shouldn't actually change anything in terms of
      precision, and simplifies the logic.
      
      llvm-svn: 79694
      608677a2
    • Ted Kremenek's avatar
  22. Aug 21, 2009
  23. Aug 17, 2009
  24. Aug 02, 2009
  25. Jul 29, 2009
    • Ted Kremenek's avatar
      Change uses of: · c23c7e6a
      Ted Kremenek authored
        Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
        Type::getAsRecordType() -> Type::getAs<RecordType>()
        Type::getAsPointerType() -> Type::getAs<PointerType>()
        Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>()
        Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>()
        Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>()
        Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>()
        Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
        Type::getAsTagType() -> Type::getAs<TagType>()
        
      And remove Type::getAsReferenceType(), etc.
      
      This change is similar to one I made a couple weeks ago, but that was partly
      reverted pending some additional design discussion. With Doug's pending smart
      pointer changes for Types, it seemed natural to take this approach.
      
      llvm-svn: 77510
      c23c7e6a
    • Ted Kremenek's avatar
      Remove 'StoreManager::OldCastRegion()', TypedViewRegion (which only · 4301526e
      Ted Kremenek authored
      OldCastRegion used), and the associated command line option
      '-analyzer-store=old-basic-cast'.
      
      llvm-svn: 77509
      4301526e
    • Ted Kremenek's avatar
      Make StoreManager::InvalidateRegion() virtual, move the current implementation · bca70671
      Ted Kremenek authored
      in StoreManager to RegionStoreManager, and create a special, highly reduced
      version in BasicStoreManager.
      
      These changes are in preparation for future RegionStore-specific changes to
      InvalidateRegion.
      
      llvm-svn: 77483
      bca70671
  26. Jul 21, 2009
  27. Jul 17, 2009
  28. Jul 16, 2009
  29. Jul 14, 2009
  30. Jul 10, 2009
  31. Jul 06, 2009
  32. Jul 03, 2009
Loading