Issue 124064
Summary [HLSL] Determine how should `cbuffer` in a namespace work
Labels HLSL
Assignees
Reporter hekota
    Constant buffers declared by `cbuffer` blocks can occur inside a namespace scope. DXC ignores the namespace and the constant buffer elements must be referenced without the namespace qualifier while in Clang the element names must use fully qualified name.

For example this constant buffer:
```
namespace ns {
  cbuffer CB {
    float a;
  }
}
```
The float value must be referenced as `a` in DXC and as `ns::a` in Clang, otherwise it fails to compile.
https://godbolt.org/z/GMzzMnh6s

This task is to determine:
- which behavior we want to support
- document it in the language spec
- make sure it gets implemented (tracked by issue llvm-project/llvm#118524).

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to