[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-14 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3efad612d234: [HLSL] Pointers are unsupported in HLSL (authored by beanz). Changed prior to commit: https://reviews.llvm.org/D123167?vs=422860&id=

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-14 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 the formatting nit. Comment at: clang/lib/Sema/SemaExpr.cpp:15252-15257 + if (getLangOpts().HLSL) { +if (Opc == UO_AddrOf) + return Ex

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-14 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 422860. beanz added a comment. Updates to test cases to increase coverage. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123167/new/ https://reviews.llvm.org/D123167 Files: clang/include/clang/Basic/Diagnostic

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-14 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. One comment inline. Update coming in a few minutes. Comment at: clang/lib/Sema/SemaExpr.cpp:15252-15257 + if (getLangOpts().HLSL) { +if (Opc == UO_AddrOf) + return ExprError(Diag(OpLoc, diag::err_hlsl_operator_unsupported) << 0); +if (Opc ==

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:11579-11584 +def err_hlsl_pointers_unsupported : Error<"%select{pointers|references}0 are " + "unsupported in HLSL">; + +def err_hlsl_operato

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-13 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 422738. beanz added a comment. Updating based on PR feedback. I've moved the error reporting into Sema, and added additional errors for unsupported operators. I've also expanded the test coverage with some of @aaron.ballman's cursed code, which improves cove

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D123167#3434383 , @beanz wrote: > In D123167#3434375 , @aaron.ballman > wrote: > >> I had a meeting with @beanz today because I was also pretty surprised. >> Chris, it might mak

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D123167#3434375 , @aaron.ballman wrote: > I had a meeting with @beanz today because I was also pretty surprised. Chris, > it might make sense to type up a bit of what we talked about as an FAQ and > maybe stick it in Clang's d

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. In D123167#3434372 , @beanz wrote: > In D123167#3434364 , @tschuett > wrote: > >> Relying on the parser to find semantic misbehavior sounds strange ... > > I don't disagree. An alternati

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D123167#3434364 , @tschuett wrote: > Relying on the parser to find semantic misbehavior sounds strange ... I had a meeting with @beanz today because I was also pretty surprised. Chris, it might make sense to type up a b

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D123167#3434364 , @tschuett wrote: > Relying on the parser to find semantic misbehavior sounds strange ... I don't disagree. An alternative point: HLSL has no _syntax_ for pointers. Repository: rG LLVM Github Monorepo CHANG

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. Relying on the parser to find semantic misbehavior sounds strange ... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123167/new/ https://reviews.llvm.org/D123167 ___ cfe-commits

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D123167#3434350 , @tschuett wrote: > Is the downstream compiler also relying on the parser? Not sure what you mean by downstream compiler. The current official HLSL compiler is a fork of clang-3.7. We don't intend to merge code

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. In D123167#3434349 , @beanz wrote: > In D123167#3434346 , @tschuett > wrote: > >> Do you need a SemaHLSL.cpp file similar to SemaSYCL.cpp? > > Yes absolutely. I haven't yet added any Sem

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D123167#3434346 , @tschuett wrote: > Do you need a SemaHLSL.cpp file similar to SemaSYCL.cpp? Yes absolutely. I haven't yet added any Sema-specific validations yet that are complex enough to break out, but we will 100% get ther

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. Do you need a SemaHLSL.cpp file similar to SemaSYCL.cpp? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123167/new/ https://reviews.llvm.org/D123167 ___ cfe-commits mailing list

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D123167#3434289 , @beanz wrote: > In D123167#3434023 , @aaron.ballman > wrote: > >> I think you're going to need semantic restrictions as well as parsing >> restrictions because

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D123167#3434023 , @aaron.ballman wrote: > I think you're going to need semantic restrictions as well as parsing > restrictions because of type deduction. Even if you don't support templates > (yet), there's still `auto`, `decl

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think you're going to need semantic restrictions as well as parsing restrictions because of type deduction. Even if you don't support templates (yet), there's still `auto`, `decltype`, `__typeof__`, and `__auto_type` (I probably missed some, lol) to worry about.

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-05 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, MaskRay, kuhar, rnk, rsmith. Herald added a subscriber: StephenFan. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. HLSL does not support