aaron.ballman added inline comments.
================ Comment at: clang/lib/Parse/ParseExprCXX.cpp:937 + return Invalid([&] { + Diag(Tok.getLocation(), diag::err_capture_default_first); + }); ---------------- Would it make sense to provide a fix-it to move the capture default to the start of the list automatically, or is that a pain? ================ Comment at: clang/test/Parser/lambda-misplaced-capture-default.cpp:11 + + [i, &] {}; // expected-error {{capture default must be first}} + [i, = ] {}; // expected-error {{capture default must be first}} ---------------- Can you also add a test showing that `[=, &i]` continues to behave properly (to test the `&]` checking logic)? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83681/new/ https://reviews.llvm.org/D83681 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits