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

    <tr>
        <th>Summary</th>
        <td>
            Suggest plausible include paths when an include fails
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          varungandhi-src
      </td>
    </tr>
</table>

<pre>
    Right now, if you have a wrong path inside an `#include`, there is no other information in the error other than that the include failed. For example, I made a silly error when trying to use LLVM in a new project.

```
main.cc:17:10: fatal error: 'llvm/Support/Optional.h' file not found
```

The problem is that it should be `ADT` and not `Support`. It would be nice if Clang could suggest that -- I'd been working on the build system and I incorrectly assumed I had messed up the build config somehow by not importing LLVM properly, and spent some time puzzling over the exact compiler invocation and the include paths therein.

This doesn't need to address every potential failure mode. E.g. I'm not asking for typo detection (although that would be nice as well).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxtU9tunDAQ_Rp4GS0CFtjdBx7SpJEiparUVH03eMBuDUa-LCVf37HZqElVCRmPLzNnzjnuNN_ab3IUDma9JuU9yAE27UGwKwKD1eh5hIU5AXK2ktPaDEmTJ-VRzr3yHGNwD06gQZCW0oAOAZ0ftJmYk3qmeTgAaIw2t20nWFhkLu7cksHApEKewSOdw99sWhSG7E8wsVAbrFRqu-VZBVIGs0lC6DR4i_D8_ONLKMZgxhUWo39i77Ikf0jyu9tIcPcvhhOTc9b3yfGuOIUhp4FAOKb2IiFMypNS1ykpH1_8smjjaPZ1CX0xlQnahYFAU-MOBu1n_t9C-_idWiVUncIpcBXblw6s0F5x6DBQe_fwnUbimceUNH8r2-QZPDlY3w7Psseg171iREEfl60fR7RuT304wBPhC4eJqlWbX4ErvYvReRnOb9YRmFDtKaigjSHKiGNmrZ8wrArGYUJrKfDLu6u9ngc5gtUTCr1Ct0W8cgpYQ50oBnW7oFFbUDEUsQvOLt4BJ2lY_Ouriqiu0RQYZO8dJZ8WYjXY6Kr73UXh_nuzBFva3Xmk4keeiV2u0c7UPlkbCTtZhHFuqBFAqrXBoh1hkSR1cJ0n-06aYwafszGLvE2xIWYja2RmcNuigaMjhgKepDwz5Ui7Uex8f1SGWVhRqaS8ZCm2RdM056ouiirl7ZFfjheWOukUti83yRbFvJXkjX8ajD5n84c3YlNvVCucWyxZlAxJ3yid8F1GzFFwc2z4HW7vgEJJoqKlSX1uqjIVbcnyoqsvvKsG1jfnvimPA-MdMuzq4VLVqWIdKtsm9aekfkhlW-ZlWeTlKa-ORV1lx_OpKRt26vOiOdenPqlypDelslA402ZMTRsxdH60tKmkdfbvJplMjqTOW37miU7TXpnx80hyC3mwpk8j7DZi_gNX4ZKd">