Skip to content
  1. Feb 17, 2012
    • Douglas Gregor's avatar
      Rework the Sema/AST/IRgen dance for the lambda closure type's · 355efbb2
      Douglas Gregor authored
      conversion to function pointer. Rather than having IRgen synthesize
      the body of this function, we instead introduce a static member
      function "__invoke" with the same signature as the lambda's
      operator() in the AST. Sema then generates a body for the conversion
      to function pointer which simply returns the address of __invoke. This
      approach makes it easier to evaluate a call to the conversion function
      as a constant, makes the linkage of the __invoke function follow the
      normal rules for member functions, and may make life easier down the
      road if we ever want to constexpr'ify some of lambdas.
      
      Note that IR generation is responsible for filling in the body of
      __invoke (Sema just adds a dummy body), because the body can't
      generally be expressed in C++.
      
      Eli, please review!
      
      llvm-svn: 150783
      355efbb2
    • Richard Smith's avatar
      Tests for the fixits which Doug added in r150727. · 50965d93
      Richard Smith authored
      llvm-svn: 150777
      50965d93
    • Richard Smith's avatar
      Reject continue/break statements within members of local functions nested within · 1002d10a
      Richard Smith authored
      loop and switch statements, by teaching Scope that a function scope never has
      a continue/break parent for the purposes of control flow. Remove the hack in
      block and lambda expressions which worked around this by pretending that such
      expressions were continue/break scopes.
      
      Remove Scope::ControlParent, since it's unused.
      
      In passing, teach default statements to recover properly from a missing ';', and
      add a fixit for same to both default and case labels (the latter already
      recovered correctly).
      
      llvm-svn: 150776
      1002d10a
    • Richard Smith's avatar
      PR12012: Fix a regression in r150419 where we would try (and fail) to · 5d108606
      Richard Smith authored
      zero-initialize class types with virtual bases when constant-evaluating an
      initializer.
      
      llvm-svn: 150770
      5d108606
  2. Feb 16, 2012
Loading