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

    <tr>
        <th>Summary</th>
        <td>
            Add `DynamicAllocLValue` and `TypeInfoLValue` support to `APValue::dump()`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            good first issue,
            clang:frontend
      </td>
    </tr>

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

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

<pre>
    `APValue` recently gained support for `dump()`ing lvalues, however, the code to handle them is missing support for lvalue bases of type `TypeInfoLValue` and `DynamicAllocLValue`:
https://github.com/llvm/llvm-project/blob/a29be9f28e8e0d4ca7a8a3cfdffe616ac780c754/clang/lib/AST/TextNodeDumper.cpp#L732-L761

Before the `else {` branch that unconditionally assumes the base to be a `const ValueDecl*`, we need to check whether the base is a dynamic alloc value or a typeid value: https://github.com/llvm/llvm-project/blob/a29be9f28e8e0d4ca7a8a3cfdffe616ac780c754/clang/lib/AST/ExprConstant.cpp#L2124-L2125

... and print something appropriate, or at least not crash.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzElM-O5CYQxp8GX0rTwuV_7YMPnum0FGkURcoo9zKU2yQYLMAz228f4c7sbhTlkNNebERRBd-P-qAYzc0xD6J5Fs2loD0tPgxpItYcQjF5fR9EK8dffye7s2glBFbskr3DjYxjDXHfNh8SzD6AaKXe103gWWAvWmncDex7zowCX2DxH_zOIQ_TwqC8ZkgeFnLacp5awURYTYw58fvCjyIwUeQIfoZ03zjv9nbf-Gc3-9evxyOnc-Byd7QaNVrr1degqEYhxyWlLeYhXgVebyYt-3RSfhV4tfb98_e0Bf8HqyTwOlk_CbwS9hP3M575zFLXijo6U6VmPc_cli2p7ixV19QCr8qSu-VCJieOv70JvL7xl_SL13zZ143DSW2bwOq1q_DptWtLIfPRnnn24SCRNbCNDKJ7zrKmQE4tkBZKsDvlnTbJeEfW3oFi3FeOR1omlJlODJRrKO9iggPAhZUVOGYO-AIfDI5Z57VqYfUnfCycFg7fqpgIBPrBESiDhMct-AB03IDRjxlRjfCDqP70ZQsvWSO59MkUS6yf8rd5UD2dTkdbbMG4BNGvnJbcYLRtwW_BUOJMJMtKYJliAucTqEBxORV6qHRf9VTwUHZ1jbLsuqpYhlnXWpaETanqWU6TrNqZGkV9RzgrXRVmQImNrGVfIvZVdWraSp1bYi1r1MhK1JJXMvaUyZx8uBUmxp2Hsqr7vi0sTWzj4UzEm_caZhNigmORQBT4IhAfUKpxDt4ldjoHmksRhgP3tN-iqKU1McVv2ySTLA-j_m-nfNro3_76dGXy8N27UI2iGv9h_WIPdvjfTXFoiwKvfzN4H_CvAAAA__8IKX_t">