shafik added inline comments.
================ Comment at: clang/lib/Sema/SemaDeclCXX.cpp:15934 + // or a reference to an enumeration. + // Note: Before C++23, a member function also has to not be static. if (CXXMethodDecl *MethodDecl = dyn_cast<CXXMethodDecl>(FnDecl)) { ---------------- ================ Comment at: clang/test/Parser/cxx2b-lambdas.cpp:42 + +auto XL7 = []() static static {}; // expected-error {{cannot appear multiple times}} +auto XL8 = []() static mutable {}; // expected-error {{cannot be both mutable and static}} ---------------- also combined w/ `constexpr` and `consteval` ================ Comment at: clang/test/Parser/cxx2b-lambdas.cpp:52 + auto SC2 = [&x]() static {}; // expected-error {{a static lambda cannot have any captures}} // expected-note {{captures declared here}} + auto SC3 = [=]() static {}; // expected-error {{a static lambda cannot have any captures}} // expected-note {{captures declared here}} +} ---------------- Why not throw in capture by copy/move as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133659/new/ https://reviews.llvm.org/D133659 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits