[PATCH] D66067: Push lambda scope earlier when transforming lambda expression

Nicholas Allegra via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 26 13:31:19 PDT 2019


comex added inline comments.


================
Comment at: clang/test/SemaTemplate/default-arguments-cxx0x.cpp:1
-// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
+// RUN: %clang_cc1 -fsyntax-only -std=c++14 -verify %s
 // expected-no-diagnostics
----------------
lebedev.ri wrote:
> Mordante wrote:
> > comex wrote:
> > > Mordante wrote:
> > > > Wouldn't it be better to keep the original C++11 test and add a second `RUN:` for the C++14 test?
> > > > Then guard the new test with `#if __cplusplus >= 201402L`
> > > Perhaps, but most tests aren't run multiple times with different -std options, and I didn't see any reason this test in particular needed that.  Maybe it should just be renamed to default-arguments-cxx14.cpp.
> > I'm rather new here so I don't know what the renaming policy is, so I leave it to the more experienced reviewers.
> The description does not call it out specifically i think - why does this need `-std=c++14`?
> That being said i see absolutely no reason not to just have two run lines here.
The ability to make a lambda parameter `auto`-typed is a C++14 feature.

Okay, I'll just add two run lines.


================
Comment at: clang/test/SemaTemplate/default-arguments-cxx0x.cpp:118
+
+namespace lambda {
+template <class T>
----------------
lebedev.ri wrote:
> This is only simply checking that clang doesn't crash on this, right?
> Add a comment about that?
Okay.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66067/new/

https://reviews.llvm.org/D66067





More information about the cfe-commits mailing list