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

    <tr>
        <th>Summary</th>
        <td>
            Provide a debugger-friendly way to get an `Expr`'s location in a file
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            enhancement,
            clang:frontend
      </td>
    </tr>

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

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

<pre>
    From a discussion on Discord: it would be beneficial for debugging if a standalone `Expr`'s `dump()` would also print where that expression can be found in a source file. Or at least _some_ way of getting this information in an easy way would be beneficail. Even if that way is only accessible in debug builds.

Using `dump()` on an expression in LLDB looks like this today;

![Screenshot from 2024-02-29 07-46-16](https://github.com/llvm/llvm-project/assets/49720664/3568b628-1384-4a44-8896-fbd77f006895)

But from this information it is very hard to figure out where this expression can be found in the source file.


This is useful for writing tests where clang needs to process the expression in source form.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU8GO2zYU_Brq8iCDpihZOuiwruNTgBZoew4o8VFiQ5EGH7kb_31BeQNnE6BALxQEEm9m3swoIrt4xJG1Z9ZeKpXTGuKYJoUaY6ymoO_jNYYNFGhLcyaywUPwcLE0h6hZ8wI2wVvITsOEMKFHY2erHJgQQeOUl8X6BawBBZSU18oFj8A6_unbLbKOM3Gi8qvzdmOiZ2JgHX-fqBwFuEXrE7ytGBHSqhLgt1vEB5NZ-QJrQvYarC8YIccZwViHB_g9gkrgUFGCLxQ2_AJv6g7BwIIpFV5ptQTWmxA3lcrEMsQDKrrvT39Wpqw7wKdX9EXRzqa8sgTBuzuoeS7EJodlzq4epmydpgPjF8ZfHuffVKB_0Rwe0E911sPnz5czuBC-Ejj7FR98U9DqzprzjzOZOLL2_OccET2tIYEptgkuZM1FLQbgp1p29bFj7YWJfk3pRqx5YeLKxHWxac3TYQ4bE1fnXr9_6lsM_-CcmLgqIkzExFUOJ8G7TjJxbdqunzrR18eml7VUUtZ9P3S1mfTpZDjv-qEt2n6gec7vzH5dfCprfMV4h1VFDSmAsUuOCCE_7bf0X_anFT8E4MOC9vOvHZYgE5r8COlbtI8oICV6B5qd8gt4RF22DbcYirH7_I_-fEcLcTtUemz00AyqwvF44oPoRc-7ah0N57IXchKzHKZGGc2lOh216nthuqGVlR2LUbzhR97LTnYHfcKZm15JoYQc2plJjlvJXnHlEOJSWaKMY9-0sqmcmtDRXmIh0K_Kz7ihT0wIJn5jQuxyWPNiYvAJvS4X7aWK427ylBdikjtLiZ4AySaH4x8xvFqNpf97lzHWJlr02j36kUKpUsntT412YX4WanejytGN_zt3u86Su13qvwEAAP__dNuJ9g">