rsmith added a comment.
In https://reviews.llvm.org/D28510#654821, @faisalv wrote:
> In https://reviews.llvm.org/D28510#653794, @rsmith wrote:
>
> > I don't think it's possible to check this in the way you're doing so here.
> > In general, there's no way to know whether a constant expression wil
faisalv updated this revision to Diff 85927.
faisalv added a comment.
I tried a different approach, not because I was convinced it was better, but
because it seemed (at the time) a simpler tweak - I'm not sure it is robust
enough - but would appreciate your thoughts on it.
The approach is predi
faisalv added a comment.
In https://reviews.llvm.org/D28510#653794, @rsmith wrote:
> I don't think it's possible to check this in the way you're doing so here. In
> general, there's no way to know whether a constant expression will be part of
> a `typedef` declaration or function declaration un
rsmith requested changes to this revision.
rsmith added a comment.
This revision now requires changes to proceed.
I don't think it's possible to check this in the way you're doing so here. In
general, there's no way to know whether a constant expression will be part of a
`typedef` declaration or
faisalv updated this revision to Diff 84476.
faisalv added a comment.
The updated patch adds two additional enumerators to
ExpressionEvaluationContext: ConstantEvaluatedInTemplateArgument and
ConstantEvaluatedInFunctionSignature and sets them appropriately (as opposed to
our previous approach o
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
>
faisalv added a comment.
Yes - I'll modify the patch to reflect that approach. Any thoughts on whether
they should also be forbidden in Lamda parameter declaration clauses?
Thanks!
Repository:
rL LLVM
https://reviews.llvm.org/D28510
___
cfe-com
rsmith added inline comments.
Comment at: include/clang/Parse/Parser.h:1432
+ ExprResult ParseConstantExpression(TypeCastState isTypeCast = NotTypeCast,
+ bool IsLambdaExprForbidden = false);
ExprResult ParseConstraintExpression();
faisalv created this revision.
faisalv added a reviewer: rsmith.
faisalv added a subscriber: cfe-commits.
faisalv set the repository for this revision to rL LLVM.
faisalv added a project: clang-c.
This patch disables lambda expressions (especially Immediately Invoked Lambda
Expressions (IILEs, to