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

    <tr>
        <th>Summary</th>
        <td>
            [llvm][docs] What is `dyn_switch` in `CodingStandards`?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            documentation,
            llvm
      </td>
    </tr>

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

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

<pre>
    Inside [llvm/docs/CodingStandards.rst#format-lambdas-like-blocks-of-code](https://github.com/llvm/llvm-project/blob/main/llvm/docs/CodingStandards.rst#format-lambdas-like-blocks-of-code), the example refers to `dyn_switch`:
```C++
dyn_switch(V->stripPointerCasts(),
 [] (PHINode *PN) {
             // process phis...
           },
 [] (SelectInst *SI) {
             // process selects...
 },
           [] (LoadInst *LI) {
             // process loads...
           },
           [] (AllocaInst *AI) {
 // process allocas...
           });
```

I grepped for examples but without any luck. I wonder if this is just some example or something that existed in the past but is no longer present. If it was something imaginary, I'd suggest something else like `std::overloaded`-like thing (like on [cppreference](https://en.cppreference.com/w/cpp/utility/variant/visit)), to not confuse readers.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyklNFu4zYThZ-GvhlYkCnLli504cS_8BtYLAIEaC8LShxJ3NCkwBklm7cvSDuNN5uiW9QQbFMYzieOzjmKyIwOsRHlnSiPK7Xw5ENDjOppUnbVef3anBwZjSDKO2ufz0K22vckZHvvtXHjIyunVdCUBWIhi8GHs-K1VedOK1pb84Trzvr-idZ-WPdeoyiPQlYT80yiOAjZCtmOhqely3of-18x8Wc9B_8Nexay7azvhGzPyrj3mv_6KLIW8h54QsDv6jxbhIADBgL2IHa5fnV_0IvhfhK7PD5sfhT5If5P172Qd_FKd29qZfXbWhT_Iw5mfvDGMYZ7RUxCVhfiZQdcpg5CVg__P331ccjy8PBVyBrE_toWbj-XYcEcfI9EME-Gsiz7qVDsj59BHtFizydHHDmPp1_mUNp4g_oBcLPtL9QXr_Qb6Muvg6xX-p9P9BnwYK3v1Rvy8AH5AaNS8d-DalHcfXjV12X6PsEYcJ5Rw-DDm3AIuoXhxfDkFwblXsEu_VMGJ3jxTmMAMwBPhsAQfFuIgfz5XXU-pDVPxo3Ak2LA74YYNRiX5Dkr4kQwBM6D9W7EAHNAQscZnAYwDC-KbtqYsxqNU-E1Svwk5F4DLeOIV_alCC0hRGdEuRPrKPLi4J8xxHeBWuzyZBy4lAtZpZV3cfb9PCe7oOs_dTW67Lbkau8XIdt-noVsFzbW8KuQ7bMKRrlo82dDhpNLLtb04DxD792wUHSn0hgoW-mm0HVRqxU2m11d7aptWRarqZHDkBcb7AY99Aq17ru-xKLeblSptlWxWZlG5rLY5EW-2W3rjcyKuq_L_T7vukJVm-1WbHM8K2OzGDGZD-PKEC3Y7PNdVa-s6tBSykspte-XMzpWbLwTUkaJSnmJJhnzNDQpxLplJLHNrSGm97Zs2KbkTRvKoyjvUpyVR_g9KsDQTxEU1RBz58e4S9nUrpZgm3-dqulsMULT8f4MAAD__7G_1Zs">