Skip to content
  1. Feb 13, 2009
    • Douglas Gregor's avatar
      Remove DeclGroupOwningRef, since we intend for declarations to be owned · 4feb36de
      Douglas Gregor authored
      by DeclContexts (always) rather than by statements. 
      
      DeclContext currently goes out of its way to avoid destroying any
      Decls that might be owned by a DeclGroupOwningRef. However, in an
      error-recovery situation, a failure in a declaration statement can
      cause all of the decls in a DeclGroupOwningRef to be destroyed after
      they've already be added into the DeclContext. Hence, DeclContext is
      left with already-destroyed declarations, and bad things happen. This
      problem was causing failures that showed up as assertions on x86 Linux
      in test/Parser/objc-forcollection-neg-2.m.
      
      llvm-svn: 64474
      4feb36de
  2. Feb 12, 2009
  3. Feb 11, 2009
  4. Feb 07, 2009
    • Ted Kremenek's avatar
      Overhaul of Stmt allocation: · 5a201951
      Ted Kremenek authored
      - Made allocation of Stmt objects using vanilla new/delete a *compiler
        error* by making this new/delete "protected" within class Stmt.
      - Now the only way to allocate Stmt objects is by using the new
        operator that takes ASTContext& as an argument.  This ensures that
        all Stmt nodes are allocated from the same (pool) allocator.
      - Naturally, these two changes required that *all* creation sites for
        AST nodes use new (ASTContext&).  This is a large patch, but the
        majority of the changes are just this mechanical adjustment.
      - The above changes also mean that AST nodes can no longer be
        deallocated using 'delete'.  Instead, one most do
        StmtObject->Destroy(ASTContext&) or do
        ASTContextObject.Deallocate(StmtObject) (the latter not running the
        'Destroy' method).
      
      Along the way I also...
      - Made CompoundStmt allocate its array of Stmt* using the allocator in
        ASTContext (previously it used std::vector).  There are a whole
        bunch of other Stmt classes that need to be similarly changed to
        ensure that all memory allocated for ASTs comes from the allocator
        in ASTContext.
      - Added a new smart pointer ExprOwningPtr to Sema.h.  This replaces
        the uses of llvm::OwningPtr within Sema, as llvm::OwningPtr used
        'delete' to free memory instead of a Stmt's 'Destroy' method.
      
      Big thanks to Doug Gregor for helping with the acrobatics of making
      'new/delete' private and the new smart pointer ExprOwningPtr!
      
      llvm-svn: 63997
      5a201951
  5. Feb 04, 2009
  6. Jan 29, 2009
  7. Jan 27, 2009
  8. Jan 21, 2009
  9. Jan 20, 2009
    • Anders Carlsson's avatar
      224fca89
    • Douglas Gregor's avatar
      Remove ScopedDecl, collapsing all of its functionality into Decl, so · 6e6ad602
      Douglas Gregor authored
      that every declaration lives inside a DeclContext.
      
      Moved several things that don't have names but were ScopedDecls (and,
      therefore, NamedDecls) to inherit from Decl rather than NamedDecl,
      including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't
      store empty DeclarationNames for these things, nor do we try to insert
      them into DeclContext's lookup structure.
      
      The serialization tests are temporarily disabled. We'll re-enable them
      once we've sorted out the remaining ownership/serialiazation issues
      between DeclContexts and TranslationUnion, DeclGroups, etc.
      
      llvm-svn: 62562
      6e6ad602
  10. Jan 18, 2009
  11. Jan 17, 2009
  12. Jan 11, 2009
  13. Dec 31, 2008
  14. Dec 28, 2008
  15. Dec 22, 2008
  16. Dec 21, 2008
  17. Dec 18, 2008
  18. Dec 06, 2008
    • Douglas Gregor's avatar
      Introduce basic support for dependent types, type-dependent · 4619e439
      Douglas Gregor authored
      expressions, and value-dependent expressions. This permits us to parse
      some template definitions.
      
      This is not a complete solution; we're missing type- and
      value-dependent computations for most of the expression types, and
      we're missing checks for dependent types and type-dependent
      expressions throughout Sema.
      
      llvm-svn: 60615
      4619e439
  19. Dec 05, 2008
  20. Dec 01, 2008
  21. Nov 24, 2008
  22. Nov 23, 2008
    • Chris Lattner's avatar
      Convert IdentifierInfo's to be printed the same as DeclarationNames · e3d20d95
      Chris Lattner authored
      with implicit quotes around them.  This has a bunch of follow-on 
      effects and requires tweaking to a whole lot of code.  This causes
      a regression in two tests (xfailed) by causing it to emit things like:
      
        Line 10: duplicate interface declaration for category 'MyClass1' ('Category1')
      
      instead of:
      
        Line 10: duplicate interface declaration for category 'MyClass1(Category1)'
      
      I will fix this in a follow-up commit.
      
      As part of this, I had to start switching stuff to use ->getDeclName() instead
      of Decl::getName() for consistency.  This is good, but I was planning to do this
      as an independent patch.  There will be several follow-on patches
      to clean up some of the mess, but this patch is already too big.
      
      llvm-svn: 59917
      e3d20d95
  23. Nov 22, 2008
  24. Nov 20, 2008
  25. Nov 19, 2008
  26. Oct 29, 2008
    • Douglas Gregor's avatar
      Implement initialization of a reference (C++ [dcl.init.ref]) as part · 8e1cf608
      Douglas Gregor authored
      of copy initialization. Other pieces of the puzzle:
      
        - Try/Perform-ImplicitConversion now handles implicit conversions
          that don't involve references.
        - Try/Perform-CopyInitialization uses
          CheckSingleAssignmentConstraints for C. PerformCopyInitialization
          is now used for all argument passing and returning values from a
          function.
        - Diagnose errors with declaring references and const values without
          an initializer. (Uses a new Action callback, ActOnUninitializedDecl).
        
      We do not yet have implicit conversion sequences for reference
      binding, which means that we don't have any overloading support for
      reference parameters yet.
      
      llvm-svn: 58353
      8e1cf608
Loading