From e83d122e4a324b4a6367e63654e36836bdc21ac9 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Tue, 13 Nov 2018 14:48:56 -0800 Subject: Fix new compiler errors. New clang compiler issues the following errors: error: a lambda parameter cannot shadow an explicitly captured entity note: variable 'CGF' is explicitly captured Unlike warnings, there is no easy way to suppress this error. Test: make checkbuild for aosp_crosshatch-userdebug Change-Id: I1c4aadf5d045d999a95403dafe6104e8daf47d7a --- lib/CodeGen/CGOpenMPRuntime.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/CGOpenMPRuntime.cpp b/lib/CodeGen/CGOpenMPRuntime.cpp index 6a0edbe0e7..512abab0ee 100644 --- a/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/lib/CodeGen/CGOpenMPRuntime.cpp @@ -6073,7 +6073,7 @@ void CGOpenMPRuntime::emitTargetDataCalls(CodeGenFunction &CGF, // Generate the code for the opening of the data environment. Capture all the // arguments of the runtime call by reference because they are used in the // closing of the region. - auto &&BeginThenGen = [&D, &CGF, &BasePointersArray, &PointersArray, + auto &&BeginThenGen = [this, &D, &BasePointersArray, &PointersArray, &SizesArray, &MapTypesArray, Device, &NumOfPtrs](CodeGenFunction &CGF, PrePostActionTy &) { // Fill up the arrays with all the mapped variables. @@ -6121,7 +6121,7 @@ void CGOpenMPRuntime::emitTargetDataCalls(CodeGenFunction &CGF, }; // Generate code for the closing of the data region. - auto &&EndThenGen = [&CGF, &BasePointersArray, &PointersArray, &SizesArray, + auto &&EndThenGen = [this, &BasePointersArray, &PointersArray, &SizesArray, &MapTypesArray, Device, &NumOfPtrs](CodeGenFunction &CGF, PrePostActionTy &) { assert(BasePointersArray && PointersArray && SizesArray && MapTypesArray && @@ -6188,7 +6188,7 @@ void CGOpenMPRuntime::emitTargetDataStandAloneCall( "Expecting either target enter, exit data, or update directives."); // Generate the code for the opening of the data environment. - auto &&ThenGen = [&D, &CGF, Device](CodeGenFunction &CGF, PrePostActionTy &) { + auto &&ThenGen = [this, &D, Device](CodeGenFunction &CGF, PrePostActionTy &) { // Fill up the arrays with all the mapped variables. MappableExprsHandler::MapValuesArrayTy BasePointers; MappableExprsHandler::MapValuesArrayTy Pointers; -- cgit v1.2.3