[PATCH] D134617: [HLSL] Support register binding attribute on global variable
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 30 10:42:26 PDT 2022
aaron.ballman added inline comments.
================
Comment at: clang/include/clang/Parse/Parser.h:2817-2818
+ void MaybeParseHLSLSemantics(Declarator &D,
+ SourceLocation *EndLoc = nullptr) {
+ if (Tok.is(tok::colon)) {
----------------
Let's assert we're in HLSL mode here so that we don't accidentally call this from non-HLSL parsing contexts.
================
Comment at: clang/test/SemaHLSL/resource_binding_attr_error.hlsl:44
+
+// FIXEME: expect-error once fix https://github.com/llvm/llvm-project/issues/57886.
+float b : register(u0, space1);
----------------
================
Comment at: clang/test/SemaHLSL/resource_binding_attr_error.hlsl:51
+}
+
+struct S {
----------------
Let's add another test for a local extern, like:
```
void func() {
extern RWBuffer<float> U : register(u5);
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134617/new/
https://reviews.llvm.org/D134617
More information about the cfe-commits
mailing list