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

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 31 01:26:24 PDT 2022


ChuanqiXu added a comment.

I've just skimmed over the patch and it is a little bit hard to understand for people who don't have a strong background. Is it possible to split this one into several parts?



================
Comment at: clang/lib/Sema/Scope.cpp:72
+  // Lambdas have an extra prototype scope that doesn't add any depth
+  if (flags & FunctionPrototypeScope && !(flags & LambdaScope))
+    PrototypeDepth++;
----------------
This looks like:


================
Comment at: clang/lib/Sema/SemaExpr.cpp:18242
 
+bool CheckCaptureUseBeforeLambdaQualifiers(Sema &S, VarDecl *Var,
+                                           SourceLocation ExprLoc,
----------------
If this is only used in current file, we should mark it as static or put in anonymous namespace. And I think this lacks a comment


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