<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/124064>124064</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [HLSL] Determine how should `cbuffer` in a namespace work
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            HLSL
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          hekota
      </td>
    </tr>
</table>

<pre>
    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).

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxsU02P4ygQ_TX4UpoI448kBx_SibJ7mDntHPaKoRKzweCloLPdv34FzvRMRyNZlly8erx6zyWJzNUhDqx7Yd2pkilOPgwT3nyU1ej123D0jqJ0EcZ0uWAg0KisDKhhfAPWc7XWWc9htF7dCJR04JVKAYwjoxEkODkjLVIhkPILbuD09xHM1fmABHHCXwDS6VJRn-8FtDijiwRzoggjQsALBnQKNdxNnHyKT0z_JmnNxWCA-2QsgnFwtNJdC-xBt8JXzkQIl2Tt20enLscbxg-MH84-AP4n58UixMnQs0LWZBTr-ePhh59SHAHbvjB-AHj4BceXjxLAxXoZQbJmLbDtKVOt718Iv0_4gL5Km_B3VkjKocgch3HF5mzoWnWUNTaHH6fFDSaO4OOE4W4IwUS4SGMJogfl58XYMv4U41KaxZmJ89Xr0du48eHKxPmdifMf397fv7mpp9Wq79meKOkGpjBpjBhm43D16EsORE0w4iRfjQ9wR7hnI6MHSsviQywo7VUqIZmY5ebYsuIkrwi0oCqgWd4QKIWi_YqRwOSIch9qYGIXg1S39Xc1RAnB2tf5yxL8P6giE-f8yURT17tOtEzs87yVHhq9b_aywqHeNtueb3f7XTUNu37fdNuur7UQQnUKdc_1iNuRS4lNW1dmEFx0vBYNb7u62W3aeju2sucXoXu929es5ThLYzf53mxhVVQNtWh531ZWjmip7KMQf3796ysTIm9mGIrsMV2JtdwaivSTIZpoyw6Xhu4Epx-Gw-TvQJNPVj8tq3Gf9vLuw61KwQ5PUZs4pXGj_Pzh1PnJvyKfmDg_JngdxP8BAAD__4wqa40">