cor3ntin added inline comments.
================ Comment at: clang/lib/Sema/SemaLambda.cpp:1127-1132 + auto it = LSI->DelayedCaptures.end(); + if (Var) + it = llvm::find_if(LSI->DelayedCaptures, [&Var](auto &&Pair) { + return Pair.second.Var == Var; + }); + if (it != LSI->DelayedCaptures.end()) { ---------------- aaron.ballman wrote: > ChuanqiXu wrote: > > I feel like my suggested change is simpler. > +1 to this suggestion being a bit easier to read. With that changes, a capture that is not in the delayed capture list forces us to go through the list of capture anyway, which seems like a waste. So this is not just about readability. it should still work, and only really matter for error cases, but it's still not identical code. 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