This revision was automatically updated to reflect the committed changes.
Closed by commit rG00ecacca7d90: [HLSL] Generate buffer subscript operators
(authored by beanz).
Changed prior to commit:
https://reviews.llvm.org/D131268?vs=456774&id=457681#toc
Repository:
rG LLVM Github Monorepo
CH
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM aside from a nit that was missed. Thanks for switching to static_cast,
that makes me happier. :-)
Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:10
beanz updated this revision to Diff 456774.
beanz added a comment.
Updating based on @aaron.ballman's feedback.
- Change reinterpret_cast -> static_cast
- Aaron likes `auto` more than me... but all in good places :D
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://revi
beanz added inline comments.
Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:243
+AST, MethodDecl->getDeclContext(), SourceLocation(), SourceLocation(),
+&II, AST.UnsignedIntTy,
+AST.getTrivialTypeSourceInfo(AST.UnsignedIntTy, SourceLocation()),
aaron.ballman added inline comments.
Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:108-113
+if (Template) {
+ if (auto TTD = dyn_cast(
+ Template->getTemplateParameters()->getParam(0)))
+Ty = Record->getASTContext().getPointerType(
+
beanz updated this revision to Diff 456731.
beanz added a comment.
Updating based on PR feedback and rebasing.
- Rebased on main today
- Made const subscript return type const &
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131268/new/
https://rev
beanz added inline comments.
Comment at: clang/test/CodeGenHLSL/buffer-array-operator.hlsl:3
+
+const RWBuffer In;
+RWBuffer Out;
python3kgae wrote:
> beanz wrote:
> > python3kgae wrote:
> > > Why add const instead of using Buffer directly?
> > >
> > Making this
python3kgae added inline comments.
Comment at: clang/test/CodeGenHLSL/buffer-array-operator.hlsl:3
+
+const RWBuffer In;
+RWBuffer Out;
beanz wrote:
> python3kgae wrote:
> > Why add const instead of using Buffer directly?
> >
> Making this const forces the const
beanz added inline comments.
Comment at: clang/test/CodeGenHLSL/buffer-array-operator.hlsl:3
+
+const RWBuffer In;
+RWBuffer Out;
python3kgae wrote:
> Why add const instead of using Buffer directly?
>
Making this const forces the const methods to be used. It is
python3kgae added inline comments.
Comment at: clang/test/CodeGenHLSL/buffer-array-operator.hlsl:3
+
+const RWBuffer In;
+RWBuffer Out;
Why add const instead of using Buffer directly?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://r
beanz 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.
python3kgae wrote:
> If we reuse this function
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 StructuredB
beanz created this revision.
beanz added reviewers: bogner, aaron.ballman, python3kgae, pow2clk.
Herald added a subscriber: Anastasia.
Herald added a project: All.
beanz requested review of this revision.
Herald added a project: clang.
In HLSL buffer types support array subscripting syntax for loa
13 matches
Mail list logo