浏览代码

Remove lambda parameter shadow (#2366)

Later versions of clang fail to compile a lambda function that includes
a parameter that shadows an explicit capture. Such a one was introduced
to HLOperationLower recently. This preserves the existing behavior while
removing the shadow.
Greg Roth 6 年之前
父节点
当前提交
c619f91173
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/HLSL/HLOperationLower.cpp

+ 1 - 1
lib/HLSL/HLOperationLower.cpp

@@ -6933,7 +6933,7 @@ void TranslateStructBufSubscriptUser(
     }
 
     if (ldInst) {
-      auto LdElement = [=, &Builder](Value *offset, IRBuilder<> &Builder) -> Value * {
+      auto LdElement = [=](Value *offset, IRBuilder<> &Builder) -> Value * {
         unsigned numComponents = 0;
         if (VectorType *VTy = dyn_cast<VectorType>(Ty)) {
           numComponents = VTy->getNumElements();