This revision disallows lambdas in template parameters, as reported in PR33696.
Details
Diff Detail
- Repository
- rC Clang
Event Timeline
include/clang/Sema/Sema.h | ||
---|---|---|
979–980 | Instead of a sequence of bools, can you add an enum for decltype / template argument / other? |
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 :)
include/clang/Sema/Sema.h | ||
---|---|---|
936–940 | 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.) |
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 :)
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!
include/clang/Sema/Sema.h | ||
---|---|---|
984 | Should EK_TemplateParameter be EK_TemplateArgument? |
include/clang/Sema/Sema.h | ||
---|---|---|
4000–4004 | Please check this fits into 80 columns and wrap the line if not. |
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.)