diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -7097,8 +7097,7 @@ unsigned InitStyle, Expr *Init); /// 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. diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp --- a/clang/lib/Sema/SemaLambda.cpp +++ b/clang/lib/Sema/SemaLambda.cpp @@ -887,10 +887,9 @@ 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, + LSI->addCapture(Var, /*isBlock*/ false, ByRef, /*isNested*/ false, Var->getLocation(), SourceLocation(), Var->getType(), /*Invalid*/ false); }