Skip to content
  1. Mar 11, 2012
  2. Feb 07, 2012
  3. Oct 14, 2011
  4. Sep 20, 2011
    • Anna Zaks's avatar
      [analyzer] Refactor PathDiagnosticLocation: Make... · c29bed39
      Anna Zaks authored
      [analyzer] Refactor PathDiagnosticLocation: Make PathDiagnosticLocation(SourceLocation...) private. Most of the effort here goes to making BugReport refer to a PathDiagnosticLocation instead of FullSourceLocation. 
      
      (Another step closer to the goal of having Diagnostics which can recover from invalid SourceLocations.)
      
      llvm-svn: 140182
      c29bed39
  5. Sep 13, 2011
  6. Aug 13, 2011
  7. Mar 01, 2011
  8. Feb 17, 2011
  9. Feb 10, 2011
  10. Dec 23, 2010
  11. Dec 22, 2010
  12. Dec 02, 2010
  13. May 19, 2010
  14. Apr 21, 2010
    • Douglas Gregor's avatar
      Overhaul the AST representation of Objective-C message send · 9a129194
      Douglas Gregor authored
      expressions, to improve source-location information, clarify the
      actual receiver of the message, and pave the way for proper C++
      support. The ObjCMessageExpr node represents four different kinds of
      message sends in a single AST node:
      
        1) Send to a object instance described by an expression (e.g., [x method:5])
        2) Send to a class described by the class name (e.g., [NSString method:5])
        3) Send to a superclass class (e.g, [super method:5] in class method)
        4) Send to a superclass instance (e.g., [super method:5] in instance method)
      
      Previously these four cases where tangled together. Now, they have
      more distinct representations. Specific changes:
      
        1) Unchanged; the object instance is represented by an Expr*.
      
        2) Previously stored the ObjCInterfaceDecl* referring to the class
        receiving the message. Now stores a TypeSourceInfo* so that we know
        how the class was spelled. This both maintains typedef information
        and opens the door for more complicated C++ types (e.g., dependent
        types). There was an alternative, unused representation of these
        sends by naming the class via an IdentifierInfo *. In practice, we
        either had an ObjCInterfaceDecl *, from which we would get the
        IdentifierInfo *, or we fell into the case below...
      
        3) Previously represented by a class message whose IdentifierInfo *
        referred to "super". Sema and CodeGen would use isStr("super") to
        determine if they had a send to super. Now represented as a
        "class super" send, where we have both the location of the "super"
        keyword and the ObjCInterfaceDecl* of the superclass we're
        targetting (statically).
      
        4) Previously represented by an instance message whose receiver is a
        an ObjCSuperExpr, which Sema and CodeGen would check for via
        isa<ObjCSuperExpr>(). Now represented as an "instance super" send,
        where we have both the location of the "super" keyword and the
        ObjCInterfaceDecl* of the superclass we're targetting
        (statically). Note that ObjCSuperExpr only has one remaining use in
        the AST, which is for "super.prop" references.
      
      The new representation of ObjCMessageExpr is 2 pointers smaller than
      the old one, since it combines more storage. It also eliminates a leak
      when we loaded message-send expressions from a precompiled header. The
      representation also feels much cleaner to me; comments welcome!
      
      This patch attempts to maintain the same semantics we previously had
      with Objective-C message sends. In several places, there are massive
      changes that boil down to simply replacing a nested-if structure such
      as:
      
        if (message has a receiver expression) {
          // instance message
          if (isa<ObjCSuperExpr>(...)) {
           // send to super
          } else {
           // send to an object
         }
        } else {
          // class message
          if (name->isStr("super")) {
            // class send to super
          } else {
            // send to class
          }
        }
      
      with a switch
      
        switch (E->getReceiverKind()) {
        case ObjCMessageExpr::SuperInstance: ...
        case ObjCMessageExpr::Instance: ...
        case ObjCMessageExpr::SuperClass: ...
        case ObjCMessageExpr::Class:...
        }
      
      There are quite a few places (particularly in the checkers) where
      send-to-super is effectively ignored. I've placed FIXMEs in most of
      them, and attempted to address send-to-super in a reasonable way. This
      could use some review.
      
      llvm-svn: 101972
      9a129194
  15. Apr 17, 2010
  16. Jan 26, 2010
  17. 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
  18. Nov 29, 2009
  19. Sep 25, 2009
    • Douglas Gregor's avatar
      Fix checking for a null pointer constant when the expression itself is · 56751b59
      Douglas Gregor authored
      value-dependent. Audit (and fixed) all calls to
      Expr::isNullPointerConstant() to provide the correct behavior with
      value-dependent expressions. Fixes PR5041 and a crash in libstdc++
      <locale>.
      
      In the same vein, properly compute value- and type-dependence for
      ChooseExpr. Fixes PR4996.
      
      llvm-svn: 82748
      56751b59
  20. Sep 09, 2009
  21. Aug 22, 2009
  22. Jul 16, 2009
  23. Jun 30, 2009
  24. Jun 18, 2009
  25. Apr 23, 2009
    • Douglas Gregor's avatar
      Eliminate the three SmallVectors in ObjCImplDecl (for instance · 29bd76fd
      Douglas Gregor authored
      methods, class methods, and property implementations) and instead
      place all of these entities into the DeclContext.
      
      This eliminates more linear walks when looking for class or instance
      methods and should make PCH (de-)serialization of ObjCDecls trivial
      (and lazy).
      
      llvm-svn: 69849
      29bd76fd
  26. Apr 18, 2009
  27. Feb 11, 2009
  28. Dec 08, 2008
  29. Nov 24, 2008
    • Chris Lattner's avatar
      Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of · f3d3faec
      Chris Lattner authored
      uses of getName() with uses of getDeclName().  This upgrades a bunch of
      diags to take DeclNames instead of std::strings.
      
      This also tweaks a couple of diagnostics to be cleaner and changes
      CheckInitializerTypes/PerformInitializationByConstructor to pass
      around DeclarationNames instead of std::strings.
      
      llvm-svn: 59947
      f3d3faec
  30. Nov 22, 2008
  31. Nov 04, 2008
  32. Oct 30, 2008
Loading