[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-09-02 Thread Chris Bieneman via Phabricator via cfe-commits
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=457681#toc Repository: rG LLVM Github Monorepo

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-09-02 Thread Aaron Ballman via Phabricator via cfe-commits
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:

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-30 Thread Chris Bieneman via Phabricator via cfe-commits
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

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:243 +AST, MethodDecl->getDeclContext(), SourceLocation(), SourceLocation(), +, AST.UnsignedIntTy, +AST.getTrivialTypeSourceInfo(AST.UnsignedIntTy, SourceLocation()),

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-30 Thread Aaron Ballman via Phabricator via cfe-commits
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( +

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-30 Thread Chris Bieneman via Phabricator via cfe-commits
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/

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-16 Thread Chris Bieneman via Phabricator via cfe-commits
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

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-12 Thread Xiang Li via Phabricator via cfe-commits
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

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-12 Thread Chris Bieneman via Phabricator via cfe-commits
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

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-12 Thread Xiang Li via Phabricator via cfe-commits
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

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-05 Thread Chris Bieneman via Phabricator via cfe-commits
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

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-05 Thread Xiang Li via Phabricator via cfe-commits
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

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-05 Thread Chris Bieneman via Phabricator via cfe-commits
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