Skip to content
  1. Mar 24, 2009
  2. Mar 22, 2009
  3. Mar 17, 2009
  4. Mar 15, 2009
  5. Mar 09, 2009
  6. Feb 28, 2009
  7. 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
  8. Jan 29, 2009
  9. Jan 28, 2009
  10. Jan 27, 2009
  11. Jan 26, 2009
  12. Jan 19, 2009
  13. Dec 17, 2008
  14. Nov 24, 2008
  15. Nov 20, 2008
  16. Nov 18, 2008
  17. Nov 08, 2008
  18. Nov 06, 2008
  19. Nov 05, 2008
  20. Nov 04, 2008
  21. Nov 03, 2008
    • Douglas Gregor's avatar
      Standard conversion sequences now have a CopyConstructor field, to · 2fe9883a
      Douglas Gregor authored
      cope with the case where a user-defined conversion is actually a copy
      construction, and therefore can be compared against other standard
      conversion sequences. While I called this a hack before, now I'm
      convinced that it's the right way to go.
      
      Compare overloads based on derived-to-base conversions that invoke
      copy constructors. 
      
      Suppress user-defined conversions when attempting to call a
      user-defined conversion.
      
      llvm-svn: 58629
      2fe9883a
    • Douglas Gregor's avatar
      Add implicitly-declared default and copy constructors to C++ classes, · 0537942f
      Douglas Gregor authored
      when appropriate.
      
      Conversions for class types now make use of copy constructors. I've
      replaced the egregious hack allowing class-to-class conversions with a
      slightly less egregious hack calling these conversions standard
      conversions (for overloading reasons).
      
      llvm-svn: 58622
      0537942f
  22. Nov 02, 2008
  23. Oct 31, 2008
  24. 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
  25. Oct 28, 2008
    • Douglas Gregor's avatar
      Improve our handling of (C++) references within Clang. Specifically: · 6b75484b
      Douglas Gregor authored
        - Do not allow expressions to ever have reference type
        - Extend Expr::isLvalue to handle more cases where having written a
          reference into the source implies that the expression is an lvalue
          (e.g., function calls, C++ casts).
        - Make GRExprEngine::VisitCall treat the call arguments as lvalues when
          they are being bound to a reference parameter.
      
      llvm-svn: 58306
      6b75484b
  26. Oct 27, 2008
    • Douglas Gregor's avatar
      Refactor the expression class hierarchy for casts. Most importantly: · e200adc5
      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.
      
      llvm-svn: 58264
      e200adc5
  27. Oct 24, 2008
  28. Oct 07, 2008
  29. Sep 12, 2008
  30. Sep 10, 2008
Loading