python3kgae added inline comments.

================
Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:220
+
+    // Const subscript operators return copies of elements, non-const return a
+    // reference so that they are assignable.
----------------
If we reuse this function for StructuredBuffer, then const subscript return a 
const reference could be better?


================
Comment at: clang/test/CodeGenHLSL/buffer-array-operator.hlsl:4
+const RWBuffer<float> In;
+RWBuffer<float> Out;
+
----------------
Maybe change In to RWBuffer<float4>
And Out[Idx] = In[Idx].z;
So we also test vector case?


================
Comment at: clang/test/CodeGenHLSL/buffer-array-operator.hlsl:16
+// CHECK: float @"??A?$RWBuffer@M@hlsl@@QBAMI@Z"
+// CHECK: %this1 = load ptr, ptr %this.addr, align 4
+// CHECK-NEXT: %h = getelementptr inbounds %"class.hlsl::RWBuffer", ptr 
%this1, i32 0, i32 0
----------------
Where is the this.addr coming from?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131268/new/

https://reviews.llvm.org/D131268

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to