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

    <tr>
        <th>Summary</th>
        <td>
            Backports a bugfix of the Clang Static Analyzer to clang-14
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clangd,
            clang-tidy,
            clang:static analyzer,
            release:backport
      </td>
    </tr>

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

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

<pre>
    The commit fixes a bug in the `apiModeling.llvm.CastValue` checker, where the new MLIR constructs formed a null-pointer which it immediately dereferenced causing a crash.
It would be grate to backport this fix since `clang-tidy` users of LLVM developers would likely encounter this crash.
Due to the `clang-tidy` integration to `clangd` even wider scale of developers might be affected.
Consequently, I think this patch deserves to be backported.

Should I create a followup patch mentioning this in some release notes?

/cherry-pick c7fa4e8
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxVU0tvozAQ_jVwsRIRk4Rw4NCmqhSpvWxXvU_sAdwYm_Wj2eyv3zHQl5SHzHi-1wxnK2_N7x6ZsMOgAmvVX_QM2Dl2TBkWqJLtCxjVs5WolenWWr8P6yP48Ao6IhWZ6FFc0GX8yK49Opy6DF7Z89PpFwEbH1wUwbPWugEloZuo9Wq0ygR01KNEz4hbDVRVEFDfmCSclr5GUIOA6ImaGoUD36-z4iEr7k6BXW3Ukp2RdY7aWLDsDOIyWhdIg_LJDaNOMZkQGky3Ckrekujo0XlmW_b09PpMdO-o7ZgezZhaXZIM4rdxUjnhfad_iBPhktBP8GQsSVLWpDsfdZlqxGTYVZFB5gVoTBq-0Q-q60OyBG2LIqBc6I4UI_6JaIK-paRPSZG5zLpGCBShRPL0TuNLOeBnFJ8Q8-9LPxk8kRlMoQGNRWt7jeMCMxAHCU-BT-C0Bt4OyBxqBE-TtQF9Vj5-B834I22Bc7fVqMSFiaqFLR5y2ZSyLmvIgwoam_tF0bJgaTpkPiV4TPGwl0CRCXZnQN_-pcwtm3PdbPPodNOHMBJzYqNPp0Ifz2taXDqkrVz-VqOzbxQdHZX3kbTyx92uLqu8b-oDFGWxqbZcbKDe7WQt6uJcVweUwPEAuYYzat9ku_uM82VonKfAP87zkH8-I01-1g6L9q8LS2x05WMgqbZ7yFXDC86LfXEoKr7flGsoS-C1lLCBal9VmG0LHEDp-ZWzrstdMxmk7DwVtfLBfxXBe9UZxEk84UMMvXWNDwiXHnQ-hdFMSfwHZZBVxA">