[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 13 09:46:49 PDT 2022


aaron.ballman accepted this revision.
aaron.ballman added a comment.

LGTM! When landing, please revert the changes to SemaDecl.cpp (no need to churn that file) and apply the one suggested refactoring (I commented to make it more clear which one I mean).



================
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()) {
----------------
ChuanqiXu wrote:
> I feel like my suggested change is simpler.
+1 to this suggestion being a bit easier to read.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119136/new/

https://reviews.llvm.org/D119136



More information about the cfe-commits mailing list