Skip to content
  1. Jun 30, 2009
    • Chris Lattner's avatar
      Key decisions about 'bool' vs '_Bool' to be based on a new flag in langoptions. · c61089a6
      Chris Lattner authored
      This is simple enough, but then I thought it would be nice to make PrintingPolicy
      get a LangOptions so that various things can key off "bool" and "C++" independently.
      This spiraled out of control.  There are many fixme's, but I think things are slightly
      better than they were before.
      
      One thing that can be improved: CFG should probably have an ASTContext pointer in it,
      which would simplify its clients.
      
      llvm-svn: 74493
      c61089a6
  2. Jun 23, 2009
  3. Jun 16, 2009
  4. May 09, 2009
    • Zhongxing Xu's avatar
      rename: MemRegion: · 8038f7b3
      Zhongxing Xu authored
       RValueType => ObjectType
       LValueType => LocationType
      
      No functionality change.
      
      llvm-svn: 71304
      8038f7b3
  5. May 06, 2009
  6. May 04, 2009
    • Ted Kremenek's avatar
      Per conversations with Zhongxing, add an 'element type' to · 02e50896
      Ted Kremenek authored
      ElementRegion.  I also removed 'ElementRegion::getArrayRegion',
      although we may need to add this back.
      
      This breaks a few test cases with RegionStore:
      - 'array-struct.c' triggers an infinite recursion in RegionStoreManager.  Need to investigate.
      - misc-ps.m triggers a failure with RegionStoreManager as we now get the diagnostic:
        'Line 159: Uninitialized or undefined return value returned to caller.'
        
      There were a bunch of places that needed to be edit
      RegionStoreManager, and we may not be passing all the correct 'element
      types' down from GRExprEngine.
      
      Zhongxing: When you get a chance, could you review this?  I could have
      easily screwed up something basic in RegionStoreManager.
      
      llvm-svn: 70830
      02e50896
  7. Apr 29, 2009
  8. Apr 21, 2009
  9. Apr 11, 2009
  10. Apr 10, 2009
    • Zhongxing Xu's avatar
      Add prototype for CodeTextRegion. · 1aced0c9
      Zhongxing Xu authored
      A CodeTextRegion wraps two kinds of data: FunctionDecl* or SymbolRef. 
      The latter comes from the symbolic function pointer that are generated from
      function calls or input data.
      
      llvm-svn: 68777
      1aced0c9
  11. Mar 31, 2009
  12. Mar 30, 2009
  13. Mar 26, 2009
    • Ted Kremenek's avatar
      analyzer infrastructure: make a bunch of changes to symbolic expressions that · 3e31c26f
      Ted Kremenek authored
      Zhongxing and I discussed by email.
      
      Main changes:
      - Removed SymIntConstraintVal and SymIntConstraint
      - Added SymExpr as a parent class to SymbolData, SymSymExpr, SymIntExpr
      - Added nonloc::SymExprVal to wrap SymExpr
      - SymbolRef is now just a typedef of 'const SymbolData*'
      - Bunch of minor code cleanups in how some methods were invoked (no functionality change)
      
      This changes are part of a long-term plan to have full symbolic expression
      trees. This will be useful for lazily evaluating complicated expressions.
      
      llvm-svn: 67731
      3e31c26f
  14. Mar 11, 2009
  15. Mar 04, 2009
    • Ted Kremenek's avatar
      MemRegion: · 9a92b950
      Ted Kremenek authored
      - Have 'TypedRegion::getRValueType()' return a null QualType for 'id<...>'
        instead of aborting.
      - Change 'TypedRegion::isBoundable()' to return true for all objects with a
        non-null RValueType (this may not be the final behavior).
      
      llvm-svn: 66093
      9a92b950
    • Ted Kremenek's avatar
      Added the notion of a "boundable region", which is a region that can have a... · d275bf3c
      Ted Kremenek authored
      Added the notion of a "boundable region", which is a region that can have a direct binding in the StoreManager.
      
      llvm-svn: 66005
      d275bf3c
  16. Mar 03, 2009
  17. Mar 01, 2009
  18. Feb 06, 2009
  19. Feb 05, 2009
    • Zhongxing Xu's avatar
      Make SymbolicRegion subclass TypedRegion, for symbols usually have types, so · 9103df16
      Zhongxing Xu authored
      do the symblic regions associated with them and we need them to be typed.
      
      Current SymbolicRegion::getRValueType() method is very restricting. It may be
      modified when we are more clear about what could be the types of symblic
      regions.
      
      BasicConstraintManager::Assume() is changed due to that now SymblicRegion is a
      subclass of SubRegion.
       
      
      llvm-svn: 63844
      9103df16
  20. Jan 30, 2009
    • Ted Kremenek's avatar
      Fix a couple bugs: · 7594e2a5
      Ted Kremenek authored
      - NonLoc::MakeVal() would use sizeof(unsigned) (literally) instead of consulting
        ASTContext for the size (in bits) of 'int'. While it worked, it was a
        conflation of concepts and using ASTContext.IntTy is 100% correct.
      - RegionStore::getSizeInElements() no longer assumes that a VarRegion has the
        type "ConstantArray", and handles the case when uses use ordinary variables
        as if they were arrays.
      - Fixed ElementRegion::getRValueType() to just return the rvalue type of its
        "array region" in the case the array didn't have ArrayType.
      - All of this fixes <rdar://problem/6541136>
      
      llvm-svn: 63347
      7594e2a5
  21. Jan 24, 2009
  22. Jan 23, 2009
  23. Jan 16, 2009
  24. Jan 08, 2009
  25. Dec 20, 2008
    • Zhongxing Xu's avatar
      Lazy bingding for region-store manager. · af7415ff
      Zhongxing Xu authored
      * Now Bind() methods take and return GRState* because binding could
        also alter GDM.
      * No variables are initialized except those declared with initial
        values.
      * failed C test cases are due to bugs in RemoveDeadBindings(),
      which removes constraints that is still alive. This will be fixed in later
      patch.
      * default value of array and struct regions will be implemented in later patch.
      
      llvm-svn: 61274
      af7415ff
  26. Dec 17, 2008
  27. Dec 13, 2008
    • Ted Kremenek's avatar
      MemRegion: · b5670fd5
      Ted Kremenek authored
      - Overhauled the notion of "types" for TypedRegions.  We now distinguish between the "lvalue" of a region (via getLValueRegion()) and the "rvalue" of a region (va getRValueRegion()).  Since a region represents a chunk of memory it has both, but we were conflating these concepts in some cases, leading to some insidious bugs.
      - Removed AnonPointeeType, partially because it is unused and because it doesn't have a clear notion of lvalue vs rvalue type.  We can add it back once there is a need for it and we can resolve its role with these concepts.
      
      StoreManager:
      - Overhauled StoreManager::CastRegion.  It expects an *lvalue* type for a region.  This is actually what motivated the overhaul to the MemRegion type mechanism.  It also no longer returns an SVal; we can just return a MemRegion*.
      - BasicStoreManager::CastRegion now overlays an "AnonTypedRegion" for pointer-pointer casts.  This matches with the MemRegion changes.
      - Similar changes to RegionStore, except I've added a bunch of FIXMEs where it wasn't 100% clear where we should use TypedRegion::getRValueRegion() or TypedRegion::getLValueRegion().
      
      AuditCFNumberCreate check:
      - Now blasts through AnonTypedRegions that may layer the original memory region, thus checking if the actually memory block is of the appropriate type.  This change was needed to work with the changes to StoreManager::CastRegion.
      
      GRExprEngine::VisitCast:
      - Conform to the new interface of StoreManager::CastRegion.
      
      Tests:
      - None of the analysis tests fail now for using the "basic store".
      - Disabled the tests 'array-struct.c' and 'rdar-6442306-1.m' pending further testing and bug fixing.
      
      llvm-svn: 60995
      b5670fd5
Loading