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

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 21 14:22:23 PDT 2018


rsmith accepted this revision.
rsmith added a comment.

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!



================
Comment at: include/clang/Sema/Sema.h:984
+    enum ExpressionKind {
+      EK_Decltype, EK_TemplateParameter, EK_Other
+    } ExprContext;
----------------
Should `EK_TemplateParameter` be `EK_TemplateArgument`?


https://reviews.llvm.org/D37442





More information about the cfe-commits mailing list