faisalv added inline comments.

================
Comment at: include/clang/Sema/Sema.h:894-895
 
+    /// \brief Whether lambda expressions are forbidden here.
+    bool IsLambdaExprForbidden;
+
----------------
rsmith wrote:
> Rather than adding a flag, how about we have two different kinds of 
> `ExpressionEvaluationContext` for constant expressions: a generic "constant 
> expression" context and a "constant expression in signature" context?
But not all lambdas that appear in template arguments are in signatures - so 
should we split it into ConstantEvaluated, 
ConstantEvaluatedInSignatureOrTemplateArg ? 


================
Comment at: lib/Parse/ParseDecl.cpp:6254
+      NumElements = ParseConstantExpression(NotTypeCast,
+       /*IsLambdaExprForbidden=*/D.getContext() == D.PrototypeContext);
     } else {
----------------
I suppose we should forbid these in a lambda parameter declaration clause too?


Repository:
  rL LLVM

https://reviews.llvm.org/D28510



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to