Explorar o código

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 %!s(int64=6) %!d(string=hai) anos
pai
achega
c619f91173
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/HLSL/HLOperationLower.cpp

+ 1 - 1
lib/HLSL/HLOperationLower.cpp

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