Skip to content
  1. Dec 23, 2010
  2. Dec 22, 2010
  3. Apr 17, 2010
  4. Mar 27, 2010
  5. Feb 08, 2010
  6. Jan 26, 2010
  7. Jan 25, 2010
    • Ted Kremenek's avatar
    • 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
  8. Nov 29, 2009
  9. Nov 28, 2009
  10. Nov 24, 2009
  11. Nov 11, 2009
    • Ted Kremenek's avatar
      Refactor DereferenceChecker to use only the new Checker API instead of · 5e1f78ae
      Ted Kremenek authored
      the old builder API.  This percolated a bunch of changes up to the
      Checker class (where CheckLocation has been renamed VisitLocation) and
      GRExprEngine.  ProgramPoint now has the notion of a "LocationCheck"
      point (with PreLoad and PreStore respectively), and a bunch of the old
      ProgramPoints that are no longer used have been removed.
      
      llvm-svn: 86798
      5e1f78ae
  12. Nov 03, 2009
  13. Oct 30, 2009
  14. Oct 29, 2009
  15. Sep 22, 2009
  16. Sep 09, 2009
  17. Sep 01, 2009
  18. Aug 22, 2009
  19. Aug 21, 2009
  20. Aug 06, 2009
  21. 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
  22. Jul 17, 2009
  23. Jul 16, 2009
    • Ted Kremenek's avatar
      Add member template 'Type::getAs<T>', which converts a Type* to a respective T*. · e3fb4b65
      Ted Kremenek authored
      This method is intended to eventually replace the individual
      Type::getAsXXXType<> methods.
      
      The motivation behind this change is twofold:
      
      1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of
      them are basically copy-and-paste.
      
      2) By centralizing the implementation of the getAs<Type> logic we can more
      smoothly move over to Doug Gregor's proposed canonical type smart pointer
      scheme.
      
      Along with this patch:
      
      a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>.
      b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>.
      
      llvm-svn: 76098
      e3fb4b65
  24. Jul 11, 2009
    • Steve Naroff's avatar
      This patch includes a conceptually simple, but very intrusive/pervasive change. · 7cae42b0
      Steve Naroff authored
      The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches.
      
      This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic.
      
      By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time. 
      
      Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks.
      
      llvm-svn: 75314
      7cae42b0
  25. Jun 18, 2009
  26. Mar 30, 2009
  27. Feb 05, 2009
    • Ted Kremenek's avatar
      Overhaul BugReporter interface and implementation. The new interface cleans up · fc5d067e
      Ted Kremenek authored
      the ownership of BugTypes and BugReports. Now BugReports are owned by BugTypes,
      and BugTypes are owned by the BugReporter object.
      
      The major functionality change in this patch is that reports are not immediately
      emitted by a call to BugReporter::EmitWarning (now called EmitReport), but
      instead of queued up in report "equivalence classes". When
      BugReporter::FlushReports() is called, it emits one diagnostic per report
      equivalence class. This provides a nice cleanup with the caching of reports as
      well as enables the BugReporter engine to select the "best" path for reporting a
      path-sensitive bug based on all the locations in the ExplodedGraph that the same
      bug could occur.
      
      Along with this patch, Leaks are now coalesced into a common equivalence class
      by their allocation site, and the "summary" diagnostic for leaks now reports the
      allocation site as the location of the bug (this may later be augmented to also
      provide an example location where the leak occurs).
      
      llvm-svn: 63796
      fc5d067e
Loading