Closed zpd2009 closed 3 years ago
save issue , looks like clang version not compatible lambda code my clang version is Apple clang version 11.0.3 (clang-1103.0.32.62) Target: x86_64-apple-darwin19.5.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
save issue , looks like clang version not compatible lambda code my clang version is Apple clang version 11.0.3 (clang-1103.0.32.62) Target: x86_64-apple-darwin19.5.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
it‘s a bug in llvm4.0. I had sloved it from llvm source code. https://reviews.llvm.org/rL291939, this patch fixed the bug.
env:
clang version Apple clang version 11.0.0 (clang-1100.0.33.17) Target: x86_64-apple-darwin19.5.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
error logs:
workspace/ollvm/obfuscator/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6275:24: error: a lambda parameter cannot shadow an explicitly captured entity CodeGenFunction &CGF, PrePostActionTy &) { ^ workspace/ollvm/obfuscator/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6274:31: note: variable 'CGF' is explicitly captured here auto &&BeginThenGen = [&D, &CGF, Device, &Info, &CodeGen, &NoPrivAction]( ^ workspace/ollvm/obfuscator/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6274:31: warning: lambda capture 'CGF' is not used [-Wunused-lambda-capture] auto &&BeginThenGen = [&D, &CGF, Device, &Info, &CodeGen, &NoPrivAction](