diff --git a/llvm/tools/llvm-snippy/include/snippy/Generator/RegisterPool.h b/llvm/tools/llvm-snippy/include/snippy/Generator/RegisterPool.h index 767954fc4873..8ddb4812f44a 100644 --- a/llvm/tools/llvm-snippy/include/snippy/Generator/RegisterPool.h +++ b/llvm/tools/llvm-snippy/include/snippy/Generator/RegisterPool.h @@ -685,10 +685,9 @@ RegPool::getNAvailableRegisters(const Twine &Desc, const MCRegisterInfo &RI, template unsigned RegPoolWrapper::getNumAvailable(const MCRegisterClass &RegClass, IsReservedTys &&...Args) const { - return std::count_if( - RegClass.begin(), RegClass.end(), [&Args..., this](auto Reg) { - return !isReserved(Reg, std::forward(Args)...); - }); + return std::count_if(RegClass.begin(), RegClass.end(), [&](auto Reg) { + return !isReserved(Reg, std::forward(Args)...); + }); } template