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

    <tr>
        <th>Summary</th>
        <td>
            [Clang Build Problem] can not build clang.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    ### Issue 
Going into the clang source dir and building using the `Makefile` generated by the `CMakeLists.txt` in the clang source results in `llvm::Optional<unsgined int>::value()` not being a member of `llvm::Optional` even though it is defined in `Optional.h`? I don't understand this. 

### To reproduce 
```
cd clang 
cmake . -B build
make -C build
```
_emits:-_
```
/home/aissy/c_cpp/src/clang/clang/include/clang/Support/RISCVVIntrinsicUtils.h:233:49: error: ‘const VScaleVal’ {aka ‘const class llvm::Optional<unsigned int>’} has no member named ‘value’
  233 |   bool isScalar() const { return Scale && Scale.value() == 0; 
```
but `value()` is defined in `./llvm/include/llvm/ADT/Optional.h` -
```
307: T &value() & { return Storage.value(); }
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx1VNtu2zAM_Rr5hYjhWo4dP_ihSdahwIYNa9fXQpIVW5ssBbp069-PspMu7TqAkMSLqUPyyNz2zx0p6SJw632UQIo9Ka4_WmUGUCZYCKMEoRmq3kYnJPTKATM98Kh0n8KiT2uKI3Xxmf2UB6UlHmGQRjoWJMY-n_27FPBJ-eDz8DukKGX-vcNJH3XwyYchWj9NhF6jfDkGZQ3ThO6i8YMymBtREvph8T8xHSUpN6RsU2pjA3CZ0DGY5MSlA3v4T0YMl08yYbFxGEEFUB56rGW5I311js1HVAi9gVvorSFlEyCaXjofUl_CqHx-6uNpfenxvcXSjs72UZxbnVItMquiP3XipE7YLshhtV36vVhn42p3aXqT5lFOKnisb_X4rp-UN6OdsFU3THn_jLt4FMcj7t6JpCUMF7syQsdeXlju4vFoXcDTt9u73cPDrQlOGa_E96C0xxbR65JSXKsWF5DOWZcO5ENJNgVpN8IaH-DhTjAtH3AAJ3sLpNmyn-xtIN7rPfyPCmq4oMI5E2n2MDKPNDhP37AJw14yL3R5CZ87A4CwEcMOALi1GmmQIDK30AoWNIgRJxmiMzAXAKSsURYlv6AhELpHAeTL9v2J8xgSud5Q9x_y5djpufrLYZwM1_t7XF_RE1bvXkaLJg3hPuF9hRKxX9YUrGPDq0Jm_M3-TdZMdlf1ut1cNXTTZH1H-5a2LAsqaNmR9XY3c3mbeApfneVaTmS9B8HM8jhnx0ypPItOd2MIx0RbLAdlUGGMPBd2-ltr2lb4hH5Ikcin0l_L42Fdt02TjV15YLWo6qbgoj1seMXXxaG54k1VlQd-4FWmGZfaJ3CkLI38BXMKPCOwTHVlUZbFpqhxp0Wd874VBadVWwpa0_UVqQo5MaXzhCO3bshcN0PicfDo1POv7cWJnE3UnHuR8rOI_xfX_cKXM2rpfVXRbL6_m_H_ATz-qq8">