| Issue |
162572
|
| Summary |
[HLSL] Namespaces should be allowed inside cbuffer decls
|
| Labels |
HLSL
|
| Assignees |
|
| Reporter |
bogner
|
Consider https://hlsl.godbolt.org/z/x6sT7baY8:
```hlsl
// -T cs_6_4
cbuffer Bar {
namespace NS {
float i;
}
}
RWStructuredBuffer<float> Out;
[numthreads(1,1,1)]
void main() {
Out[0] = NS::i;
}
```
As per microsoft/hlsl-specs#671, namespaces nested inside cbuffer decls are allowed. We shouldn't error on them.
The fix should be as simple as updating [validateDeclsInsideHLSLBuffer](https://github.com/llvm/llvm-project/blob/llvmorg-22-init/clang/lib/Parse/ParseHLSL.cpp#L22) to stop explicitly disallowing them.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs