Skip to content
  1. Nov 17, 2008
  2. Nov 15, 2008
  3. Nov 13, 2008
    • Douglas Gregor's avatar
      Don't build identifiers for C++ constructors, destructors, or · b6acda0f
      Douglas Gregor authored
      conversion functions. Instead, we just use a placeholder identifier
      for these (e.g., "<constructor>") and override NamedDecl::getName() to
      provide a human-readable name.
      
      This is one potential solution to the problem; another solution would
      be to replace the use of IdentifierInfo* in NamedDecl with a different
      class that deals with identifiers better. I'm also prototyping that to
      see how it compares, but this commit is better than what we had
      previously.
      
      llvm-svn: 59193
      b6acda0f
  4. Nov 12, 2008
    • Douglas Gregor's avatar
      Implement support for operator overloading using candidate operator · a11693bc
      Douglas Gregor authored
      functions for built-in operators, e.g., the builtin
      
        bool operator==(int const*, int const*)
      
      can be used for the expression "x1 == x2" given:
      
        struct X {
          operator int const*();
        } x1, x2;
      
      The scheme for handling these built-in operators is relatively simple:
      for each candidate required by the standard, create a special kind of
      candidate function for the built-in. If overload resolution picks the
      built-in operator, we perform the appropriate conversions on the
      arguments and then let the normal built-in operator take care of it. 
      
      There may be some optimization opportunity left: if we can reduce the
      number of built-in operator overloads we generate, overload resolution
      for these cases will go faster. However, one must be careful when
      doing this: GCC generates too few operator overloads in our little
      test program, and fails to compile it because none of the overloads it
      generates match.
      
      Note that we only support operator overload for non-member binary
      operators at the moment. The other operators will follow.
      
      As part of this change, ImplicitCastExpr can now be an lvalue.
      
      llvm-svn: 59148
      a11693bc
  5. Nov 10, 2008
  6. Nov 08, 2008
  7. Nov 07, 2008
  8. Nov 06, 2008
  9. Nov 05, 2008
  10. Nov 04, 2008
  11. Nov 03, 2008
  12. Oct 31, 2008
  13. Oct 30, 2008
  14. Oct 29, 2008
    • Douglas Gregor's avatar
      Implement overloading rules for reference binding · ef30a5ff
      Douglas Gregor authored
      llvm-svn: 58381
      ef30a5ff
    • Douglas Gregor's avatar
      Tweak Sema::CheckReferenceInit so that it (optionally) computes an · 786ab211
      Douglas Gregor authored
      ImplicitConversionSequence and, when doing so, following the specific
      rules of [over.best.ics]. 
      
      The computation of the implicit conversion sequences implements C++
      [over.ics.ref], but we do not (yet) have ranking for implicit
      conversion sequences that use reference binding.
      
      llvm-svn: 58357
      786ab211
    • 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
  15. Oct 23, 2008
  16. Oct 22, 2008
  17. Oct 21, 2008
  18. Oct 15, 2008
    • Argyrios Kyrtzidis's avatar
      Fix this bug: · 2e3e7563
      Argyrios Kyrtzidis authored
      typedef int f();
      struct S {
         f *x; // incorrectly assuming this is function decl, leading to failed assertions.
      };
      
      llvm-svn: 57598
      2e3e7563
  19. Oct 14, 2008
Loading