Skip to content
  1. Nov 08, 2013
  2. Nov 07, 2013
    • Douglas Gregor's avatar
      Modules: Teach the preprocessor to recognize 'import' only after an '@'. · 594b8c93
      Douglas Gregor authored
      The preprocessor currently recognizes module declarations to load a
      module based on seeing the 'import' keyword followed by an
      identifier. This sequence is fairly unlikely in C (one would need a
      type named 'import'), but is more common in Objective-C (where a
      variable named 'import' can cause problems). Since import declarations
      currently require a leading '@', recognize that in the preprocessor as
      well. Fixes <rdar://problem/15084587>.
      
      llvm-svn: 194225
      594b8c93
    • Douglas Gregor's avatar
      Re-instate contextual conversion to Objective-C pointers in message sends. · 4b60a159
      Douglas Gregor authored
      When performing an Objective-C message send to a value of class type,
      perform a contextual conversion to an Objective-C pointer type. We've
      had this for a long time, but it recently regressed. Fixes
      <rdar://problem/15234703>.
      
      llvm-svn: 194224
      4b60a159
    • Richard Smith's avatar
      PR17800: When performing pack expansion, we must always rebuild the AST nodes · 2aa81a71
      Richard Smith authored
      to avoid breaking AST invariants by reusing Stmt nodes within the same
      function.
      
      llvm-svn: 194217
      2aa81a71
    • Richard Smith's avatar
      Tests for CWG issue 165-170. · 786d8a26
      Richard Smith authored
      llvm-svn: 194215
      786d8a26
    • Richard Smith's avatar
      PR17615: A delegating constructor initializer is a full-expression. Don't · 9ff62af3
      Richard Smith authored
      forget to clean up temporaries at the end of it.
      
      llvm-svn: 194213
      9ff62af3
    • Chris Wailes's avatar
      Added a test case for the fix to bug 17632 in r193751 · faed9c67
      Chris Wailes authored
      llvm-svn: 194212
      faed9c67
    • Richard Barton's avatar
      72c5d911
    • Enea Zaffanella's avatar
      Fixed bug in return type of __builtin_va_start(). · b1b1b8ab
      Enea Zaffanella authored
      llvm-svn: 194197
      b1b1b8ab
    • Richard Smith's avatar
      Tests for DR150 - DR165. · 14bdd7a9
      Richard Smith authored
      llvm-svn: 194192
      14bdd7a9
    • Faisal Vali's avatar
      This patch implements capturing of variables within generic lambdas. · a17d19fb
      Faisal Vali authored
      Both Richard and I felt that the current wording in the working paper needed some tweaking - Please see http://llvm-reviews.chandlerc.com/D2035 for additional context and references to core-reflector messages that discuss wording tweaks.
      
      What is implemented is what we had intended to specify in Bristol; but, recently felt that the specification might benefit from some tweaking and fleshing.  
      
      As a rough attempt to explain the semantics: If a nested lambda with a default-capture names a variable within its body, and if the enclosing full expression that contains the name of that variable is instantiation-dependent - then an enclosing lambda that is capture-ready (i.e. within a non-dependent context) must capture that variable, if all intervening nested lambdas can potentially capture that variable if they need to, and all intervening parent lambdas of the capture-ready lambda can and do capture the variable.      
      
      Of note, 'this' capturing is also currently underspecified in the working paper for generic lambdas.  What is implemented here is if the set of candidate functions in a nested generic lambda includes both static and non-static member functions (regardless of viability checking - i.e. num and type of parameters/arguments) - and if all intervening nested-inner lambdas between the capture-ready lambda and the function-call containing nested lambda can capture 'this' and if all enclosing lambdas of the capture-ready lambda can capture 'this', then 'this' is speculatively captured by that capture-ready lambda.
      
      Hopefully a paper for the C++ committee (that Richard and I had started some preliminary work on) is forthcoming. 
      
      This essentially makes generic lambdas feature complete, except for known bugs. The more prominent ones (and the ones I am currently aware of) being:
        - generic lambdas and init-captures are broken - but a patch that fixes this is already in the works ...
        - nested variadic expansions such as:
          auto K = [](auto ... OuterArgs) {
            vp([=](auto ... Is) {
                decltype(OuterArgs) OA = OuterArgs;
                return 0;
              }(5)...);
            return 0;
          };
          auto M = K('a', ' ', 1, " -- ", 3.14); 
         currently cause crashes.  I think I know how to fix this (since I had done so in my initial implementation) - but it will probably take some work and back & forth with Doug and Richard.
      
      A warm thanks to all who provided feedback - and especially to Doug Gregor and Richard Smith for their pivotal guidance: their insight and prestidigitation in such matters is boundless!
      
      Now let's hope this commit doesn't upset the buildbot gods ;)
      
      Thanks!
      
      llvm-svn: 194188
      a17d19fb
  3. Nov 06, 2013
  4. Nov 05, 2013
Loading