Skip to content
Snippets Groups Projects
  1. Dec 22, 2010
  2. Dec 16, 2010
    • Ted Kremenek's avatar
      Start migration of static analyzer to using the · 892697dd
      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.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121960 91177308-0d34-0410-b5e6-96231b3b80d8
      892697dd
  3. Dec 06, 2010
  4. Dec 04, 2010
    • John McCall's avatar
      Although we currently have explicit lvalue-to-rvalue conversions, they're · f6a16481
      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.
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120890 91177308-0d34-0410-b5e6-96231b3b80d8
      f6a16481
  5. Dec 02, 2010
  6. Nov 25, 2010
  7. Nov 24, 2010
  8. Nov 20, 2010
  9. Sep 03, 2010
  10. Jul 01, 2010
  11. Apr 14, 2010
  12. Apr 05, 2010
  13. Mar 27, 2010
  14. Mar 05, 2010
  15. Jan 25, 2010
    • Ted Kremenek's avatar
      Split libAnalysis into two libraries: libAnalysis and libChecker. · 1309f9a3
      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.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94406 91177308-0d34-0410-b5e6-96231b3b80d8
      1309f9a3
  16. Jan 09, 2010
  17. Nov 28, 2009
  18. Sep 09, 2009
  19. Aug 28, 2009
  20. Aug 27, 2009
  21. Aug 23, 2009
  22. Jul 01, 2009
  23. Jun 30, 2009
  24. Jun 23, 2009
  25. Jun 19, 2009
  26. Jun 18, 2009
  27. Mar 12, 2009
  28. Mar 03, 2009
  29. Feb 14, 2009
  30. Jan 21, 2009
  31. Nov 25, 2008
  32. Nov 12, 2008
    • Ted Kremenek's avatar
      GRStateRef: · d4931632
      Ted Kremenek authored
      - Rename SetSVal to BindLoc
      - Add BindDecl
      - Add BindExpr
      
      GRState:
      - Environment now binds to Stmt* instead of Expr*.  This is needed for processing ObjCForCollectionStmt (essentially the declaration of the the 'element' variable can have an SVal attached to it).
      - BindDecl no longer accepts Expr* for the initialization value; use SVal* instead.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59152 91177308-0d34-0410-b5e6-96231b3b80d8
      d4931632
  33. Oct 30, 2008
  34. Oct 28, 2008
  35. Oct 27, 2008
    • Douglas Gregor's avatar
      Refactor the expression class hierarchy for casts. Most importantly: · 49badde0
      Douglas Gregor authored
        - CastExpr is the root of all casts
        - ImplicitCastExpr is (still) used for all explicit casts
        - ExplicitCastExpr is now the root of all *explicit* casts
        - ExplicitCCastExpr (new name needed!?) is a C-style cast in C or C++
        - CXXFunctionalCastExpr inherits from ExplicitCastExpr
        - CXXNamedCastExpr inherits from ExplicitCastExpr and is the root of all
          of the C++ named cast expression types (static_cast, dynamic_cast, etc.)
        - Added classes CXXStaticCastExpr, CXXDynamicCastExpr, 
          CXXReinterpretCastExpr, and CXXConstCastExpr to 
      
      Also, fixed returned-stack-addr.cpp, which broke once when we fixed
      reinterpret_cast to diagnose double->int* conversions and again when
      we eliminated implicit conversions to reference types. The fix is in
      both testcase and SemaChecking.cpp.
      
      Most of this patch is simply support for the renaming. There's very
      little actual change in semantics.
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58264 91177308-0d34-0410-b5e6-96231b3b80d8
      49badde0
Loading