Skip to content

Commit 0a7ca80

Browse files
committed
Fix parameter name in Sema::addInitCapture to ByRef.
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
1 parent a85f585 commit 0a7ca80

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

clang/include/clang/Sema/Sema.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7171,8 +7171,7 @@ class Sema final {
71717171
IdentifierInfo *Id, unsigned InitStyle, Expr *Init, DeclContext *DeclCtx);
71727172

71737173
/// Add an init-capture to a lambda scope.
7174-
void addInitCapture(sema::LambdaScopeInfo *LSI, VarDecl *Var,
7175-
bool isReferenceType);
7174+
void addInitCapture(sema::LambdaScopeInfo *LSI, VarDecl *Var, bool ByRef);
71767175

71777176
/// Note that we have finished the explicit captures for the
71787177
/// given lambda.

clang/lib/Sema/SemaLambda.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -798,12 +798,11 @@ VarDecl *Sema::createLambdaInitCaptureVarDecl(
798798
return NewVD;
799799
}
800800

801-
void Sema::addInitCapture(LambdaScopeInfo *LSI, VarDecl *Var,
802-
bool isReferenceType) {
801+
void Sema::addInitCapture(LambdaScopeInfo *LSI, VarDecl *Var, bool ByRef) {
803802
assert(Var->isInitCapture() && "init capture flag should be set");
804-
LSI->addCapture(Var, /*isBlock*/ false, isReferenceType,
805-
/*isNested*/ false, Var->getLocation(), SourceLocation(),
806-
Var->getType(), /*Invalid*/ false);
803+
LSI->addCapture(Var, /*isBlock=*/false, ByRef,
804+
/*isNested=*/false, Var->getLocation(), SourceLocation(),
805+
Var->getType(), /*Invalid=*/false);
807806
}
808807

809808
// Unlike getCurLambda, getCurrentLambdaScopeUnsafe doesn't

0 commit comments

Comments
 (0)