aaron.ballman added inline comments.
================ Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7702 + def err_lambda_used_before_capture: Error< + "captured variable %0 cannot appear before the end of the lambda's parameter list">; def note_lambda_variable_capture_fixit : Note< ---------------- aaron.ballman wrote: > cor3ntin wrote: > > aaron.ballman wrote: > > > > > That doesn't work > > > > ``` > > [a]<typename x = decltype(a)>(decltype(a) ) > > ^ nope ^ double nope > > ``` > It looks like this comment may have been missed. Thank you for this! I think we should go with %select to name where it cannot be used. e.g., `cannot be used in a lambda %select{parameter list|template parameter list|whatever}1` ================ Comment at: clang/test/SemaCXX/lambda-capture-type-deduction.cpp:61 + (); + [x]() requires is_same<const int &, decltype((x))> {} + (); ---------------- Can you also add test coverage for when the `requires` comes *before* the parens as in: `[x] requires(is_same<const int &, decltype((x))>)(){}();`? I think you should also look at the grammar for lambda-expression to make sure we're not missing other coverage (use in attributes also appears to be untested). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119136/new/ https://reviews.llvm.org/D119136 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits