Page MenuHomePhabricator

[C++17] Disallow lambdas in template parameters (PR33696).

Authored by Rakete1111 on Sep 4 2017, 9:03 AM.

Diff Detail


Event Timeline

Rakete1111 created this revision.Sep 4 2017, 9:03 AM
rsmith added inline comments.Sep 5 2017, 1:26 PM
979–980 ↗(On Diff #113765)

Instead of a sequence of bools, can you add an enum for decltype / template argument / other?

Good idea! Updated diff :)

  • rebased

Does anyone have a better name than ExpressionType? I don't really like it.

Rakete1111 updated this revision to Diff 128667.Jan 4 2018, 3:56 PM

Rebased + friendly 2018 ping

rsmith accepted this revision.Jan 4 2018, 4:14 PM

Thanks, looks good other than ExpressionType. This is fine to commit with either of the names I suggested; let me know if you have a better alternative :)

935–939 ↗(On Diff #128667)

This name is too vague as a member of Sema, but would be OK as a member of ExpressionEvaluationContextRecord, or if renamed to something like ExpressionEvaluationContextExprKind. (Also, we generally use Kind rather than Type for situations like this.)

This revision is now accepted and ready to land.Jan 4 2018, 4:14 PM

I put the enum in ExpressionEvaluationContextRecord now, and fixed the Type -> Kind issue.

If it's still ok, could you please commit it @rsmith? Thanks :)

Rebase and ping :)

Rebase and friendly ping :)

Rebased + friendly ping :)

rsmith accepted this revision.Jun 21 2018, 2:22 PM

Please also change the EnterExpressionEvaluationContext in TreeTransform::TransformTemplateArgument to specify EK_TemplateArgument (though that doesn't actually matter for the lambda diagnostics because we'll find all the problems in the template definition context). Then this LGTM. Thanks!

984 ↗(On Diff #152374)

Should EK_TemplateParameter be EK_TemplateArgument?

Added expression evaluation context to TreeTransform :)

Rakete1111 marked 3 inline comments as done.Jun 27 2018, 2:04 PM

Rebased + friendly ping

rsmith accepted this revision.Jul 10 2018, 2:53 PM
rsmith added inline comments.
4000–4004 ↗(On Diff #154880)

Please check this fits into 80 columns and wrap the line if not.

Format lines longer than 80 characters correctly.

Rakete1111 marked an inline comment as done.Jul 12 2018, 11:41 AM
This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.