Skip to content
  1. Feb 28, 2011
  2. Feb 17, 2011
    • Chris Lattner's avatar
      Step #1/N of implementing support for __label__: split labels into · c8e630e4
      Chris Lattner authored
      LabelDecl and LabelStmt.  There is a 1-1 correspondence between the
      two, but this simplifies a bunch of code by itself.  This is because
      labels are the only place where we previously had references to random
      other statements, causing grief for AST serialization and other stuff.
      
      This does cause one regression (attr(unused) doesn't silence unused
      label warnings) which I'll address next.
      
      This does fix some minor bugs:
      1. "The only valid attribute " diagnostic was capitalized.
      2. Various diagnostics printed as ''labelname'' instead of 'labelname'
      3. This reduces duplication of label checking between functions and blocks.
      
      Review appreciated, particularly for the cindex and template bits.
      
      llvm-svn: 125733
      c8e630e4
  3. Feb 16, 2011
  4. Feb 10, 2011
  5. Feb 08, 2011
  6. Jan 25, 2011
  7. Dec 23, 2010
  8. Dec 22, 2010
  9. Dec 02, 2010
  10. Dec 01, 2010
  11. Sep 15, 2010
    • Ted Kremenek's avatar
      Disallow the use of UnknownVal as the index for ElementRegions. UnknownVals can be used as · c4deb923
      Ted Kremenek authored
      the index when the value evaluation isn't powerful enough.  By creating ElementRegions with
      UnknownVals as the index, this gives the false impression that they are the same element, when
      they really aren't.  This becomes really problematic when deriving symbols from these regions
      (e.g., those representing the initial value of the index), since two different indices will
      get the same symbol for their binding.
      
      This fixes an issue with the idempotent operations checker that would cause two indices that
      are clearly not the same to make it appear as if they always had the same value.
      
      Fixes <rdar://problem/8431728>.
      
      llvm-svn: 113920
      c4deb923
  12. Aug 25, 2010
  13. Aug 21, 2010
  14. Jul 06, 2010
    • Tom Care's avatar
      Added a path-sensitive idempotent operation checker... · 3ff08a8e
      Tom Care authored
      Added a path-sensitive idempotent operation checker (-analyzer-idempotent-operation). Finds idempotent and/or tautological operations in a path sensitive context, flagging operations that have no effect or a predictable effect.
      
      Example:
      {
      int a = 1;
      int b = 5;
      int c = b / a; // a is 1 on all paths
      }
      
      - New IdempotentOperationChecker class
      - Moved recursive Stmt functions in r107675 to IdempotentOperationChecker
      - Minor refactoring of SVal to allow checking for any integer
      - Added command line option for check
      - Added basic test cases
      
      llvm-svn: 107706
      3ff08a8e
  15. Apr 19, 2010
  16. Mar 10, 2010
  17. Feb 05, 2010
  18. 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
  19. Jan 11, 2010
  20. Nov 25, 2009
  21. Nov 10, 2009
  22. Nov 09, 2009
  23. Sep 09, 2009
  24. Aug 28, 2009
  25. Aug 23, 2009
  26. Aug 06, 2009
    • Ted Kremenek's avatar
      Implement lazy "copying" of structures and arrays in RegionStore. While · fa41714d
      Ted Kremenek authored
      RegionStore already lazily abstracted the contents of arrays and structs, when
      doing an assignment from one array/struct to another we did an explicit
      element-wise copy, which resulted in a loss of laziness and huge performance
      problem when analyzing many code bases.
      
      Now RegionStoreManager handles such assignments using a new SVal could
      'LazyCompoundSVal', which basically means the value of a given struct or array
      (a MemRegion*) in a specific state (GRState). When we do a load from a field
      whose encompassing struct binds to a LazyCompoundSVal, we essentially do a field
      lookup in the original structure. This means we have essentially zero copying of
      data for structs/arrays and everything stays lazy.
      
      llvm-svn: 78268
      fa41714d
  27. Jul 29, 2009
  28. Jul 14, 2009
  29. Jun 30, 2009
  30. Jun 26, 2009
    • Ted Kremenek's avatar
      Introduce a new concept to the static analyzer: SValuator. · 1642bdaa
      Ted Kremenek authored
      GRTransferFuncs had the conflated role of both constructing SVals (symbolic
      expressions) as well as handling checker-specific logic. Now SValuator has the
      role of constructing SVals from expressions and GRTransferFuncs just handles
      checker-specific logic. The motivation is by separating these two concepts we
      will be able to much more easily create richer constraint-generating logic
      without coupling it to the main checker transfer function logic.
      
      We now have one implementation of SValuator: SimpleSValuator.
      
      SimpleSValuator is essentially the SVal-related logic that was in GRSimpleVals
      (which is removed in this patch). This includes the logic for EvalBinOp,
      EvalCast, etc. Because SValuator has a narrower role than the old
      GRTransferFuncs, the interfaces are much simpler, and so is the implementation
      of SimpleSValuator compared to GRSimpleVals. I also did a line-by-line review of
      SVal-related logic in GRSimpleVals and cleaned it up while moving it over to
      SimpleSValuator.
      
      As a consequence of removing GRSimpleVals, there is no longer a
      '-checker-simple' option. The '-checker-cfref' did everything that option did
      but also ran the retain/release checker. Of course a user may not always wish to
      run the retain/release checker, nor do we wish core analysis logic buried in the
      checker-specific logic. The next step is to refactor the logic in CFRefCount.cpp
      to separate out these pieces into the core analysis engine.
      
      llvm-svn: 74229
      1642bdaa
  31. Jun 25, 2009
  32. Jun 23, 2009
Loading