Skip to content
  1. Mar 09, 2012
    • Ted Kremenek's avatar
      [analyzer] Implement basic path diagnostic pruning based on "interesting" symbols and regions. · 1e809b4c
      Ted Kremenek authored
      Essentially, a bug centers around a story for various symbols and regions.  We should only include
      the path diagnostic events that relate to those symbols and regions.
      
      The pruning is done by associating a set of interesting symbols and regions with a BugReporter, which
      can be modified at BugReport creation or by BugReporterVisitors.
      
      This patch reduces the diagnostics emitted in several of our test cases.  I've vetted these as
      having desired behavior.  The only regression is a missing null check diagnostic for the return
      value of realloc() in test/Analysis/malloc-plist.c.  This will require some investigation to fix,
      and I have added a FIXME to the test case.
      
      llvm-svn: 152361
      1e809b4c
  2. Feb 05, 2012
  3. Feb 04, 2012
  4. Jan 28, 2012
  5. Jan 26, 2012
  6. Oct 26, 2011
  7. Oct 25, 2011
    • Anna Zaks's avatar
      [analyzer] Simplify CheckerContext · b473816b
      Anna Zaks authored
      Remove dead members/parameters: ProgramState, respondsToCallback, autoTransition.
      Remove addTransition method since it's the same as generateNode. Maybe we should
      rename generateNode to genTransition (since a transition is always automatically
      generated)?
      
      llvm-svn: 142946
      b473816b
  8. Oct 06, 2011
  9. Aug 20, 2011
    • Anna Zaks's avatar
      Static Analyzer Diagnostics: Kill the addVisitorCreator(callbackTy, void*) API... · f86615ca
      Anna Zaks authored
      Static Analyzer Diagnostics: Kill the addVisitorCreator(callbackTy, void*) API in favor of addVisitor(BugReporterVisitor*).
      
      1) Create a header file to expose the predefined visitors. And move the parent(BugReporterVisitor) there as well.
      
      2) Remove the registerXXXVisitor functions - the Visitor constructors/getters can be used now to create the object. One exception is registerVarDeclsLastStore(), which registers more then one visitor, so make it static member of FindLastStoreBRVisitor.
      
      3) Modify all the checkers to use the new API.
      
      llvm-svn: 138126
      f86615ca
  10. Aug 18, 2011
    • Anna Zaks's avatar
      Remove EnhancedBugReport and RangedBugReport - pull all the extra... · 3a6bdf8f
      Anna Zaks authored
      Remove EnhancedBugReport and RangedBugReport - pull all the extra functionality they provided into their parent BugReport. The only functional changes are: made getRanges() non const - it adds default range to Ranges if none are supplied, made getStmt() private, which was another FIXME.
      
      llvm-svn: 137894
      3a6bdf8f
  11. Aug 16, 2011
  12. Jul 23, 2011
  13. Mar 01, 2011
  14. Feb 28, 2011
  15. Feb 10, 2011
  16. Feb 08, 2011
  17. Jan 11, 2011
  18. Dec 23, 2010
  19. Dec 22, 2010
  20. Dec 20, 2010
  21. Dec 16, 2010
    • Ted Kremenek's avatar
      Start migration of static analyzer to using the · 8219b821
      Ted Kremenek authored
      implicit lvalue-to-rvalue casts that John McCall
      recently introduced.  This causes a whole bunch
      of logic in the analyzer for handling lvalues
      to vanish.  It does, however, raise a few issues
      in the analyzer w.r.t to modeling various constructs
      (e.g., field accesses to compound literals).
      
      The .c/.m analysis test cases that fail are
      due to a missing lvalue-to-rvalue cast that
      will get introduced into the AST.  The .cpp
      failures were more than I could investigate in
      one go, and the patch was already getting huge.
      I have XFAILED some of these tests, and they
      should obviously be further investigated.
      
      Some highlights of this patch include:
      
      - CFG no longer requires an lvalue bit for
        CFGElements
      - StackFrameContext doesn't need an 'asLValue'
        flag
      - The "VisitLValue" path from GRExprEngine has
        been eliminated.
      
      Besides the test case failures (XFAILed), there
      are surely other bugs that are fallout from
      this change.
      
      llvm-svn: 121960
      8219b821
  22. Dec 04, 2010
    • John McCall's avatar
      Although we currently have explicit lvalue-to-rvalue conversions, they're · 34376a68
      John McCall authored
      not actually frequently used, because ImpCastExprToType only creates a node
      if the types differ.  So explicitly create an ICE in the lvalue-to-rvalue
      conversion code in DefaultFunctionArrayLvalueConversion() as well as several
      other new places, and consistently deal with the consequences throughout the
      compiler.
      
      In addition, introduce a new cast kind for loading an ObjCProperty l-value,
      and make sure we emit those nodes whenever an ObjCProperty l-value appears
      that's not on the LHS of an assignment operator.
      
      This breaks a couple of rewriter tests, which I've x-failed until future
      development occurs on the rewriter.
      
      Ted Kremenek kindly contributed the analyzer workarounds in this patch.
      
      llvm-svn: 120890
      34376a68
  23. Dec 01, 2010
  24. Oct 26, 2010
  25. Sep 10, 2010
  26. Mar 27, 2010
  27. Mar 23, 2010
  28. Jan 26, 2010
  29. 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
  30. Nov 28, 2009
  31. Nov 24, 2009
Loading