Fix parameter name in Sema::addInitCapture to ByRef.
authorJens Massberg <massberg@google.com>
Wed, 7 Jun 2023 13:15:07 +0000 (15:15 +0200)
committerJens Massberg <massberg@google.com>
Wed, 7 Jun 2023 16:06:19 +0000 (18:06 +0200)
Rename parameter in Sema::addInitCapture as proposed in review of Sema::addInitCapture. Sorry, that I have missed the comment there!

Reviewed By: ilya-biryukov

Differential Revision: https://reviews.llvm.org/D139541

clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaLambda.cpp

index cf25f39..a158469 100644 (file)
@@ -7171,8 +7171,7 @@ public:
       IdentifierInfo *Id, unsigned InitStyle, Expr *Init, DeclContext *DeclCtx);
 
   /// Add an init-capture to a lambda scope.
-  void addInitCapture(sema::LambdaScopeInfo *LSI, VarDecl *Var,
-                      bool isReferenceType);
+  void addInitCapture(sema::LambdaScopeInfo *LSI, VarDecl *Var, bool ByRef);
 
   /// Note that we have finished the explicit captures for the
   /// given lambda.
index 730f70e..c1d70ad 100644 (file)
@@ -798,12 +798,11 @@ VarDecl *Sema::createLambdaInitCaptureVarDecl(
   return NewVD;
 }
 
-void Sema::addInitCapture(LambdaScopeInfo *LSI, VarDecl *Var,
-                          bool isReferenceType) {
+void Sema::addInitCapture(LambdaScopeInfo *LSI, VarDecl *Var, bool ByRef) {
   assert(Var->isInitCapture() && "init capture flag should be set");
-  LSI->addCapture(Var, /*isBlock*/ false, isReferenceType,
-                  /*isNested*/ false, Var->getLocation(), SourceLocation(),
-                  Var->getType(), /*Invalid*/ false);
+  LSI->addCapture(Var, /*isBlock=*/false, ByRef,
+                  /*isNested=*/false, Var->getLocation(), SourceLocation(),
+                  Var->getType(), /*Invalid=*/false);
 }
 
 // Unlike getCurLambda, getCurrentLambdaScopeUnsafe doesn't