<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/129448>129448</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clangd] Show Value on hover for objects representable at constexpr
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
torshepherd
</td>
</tr>
</table>
<pre>
Currently, hovers on basic values like `const char*` display their constexpr value:

However, hovers on structs and other objects don't show a value:

They _could_ feasibly use one of three strategies for displaying a value:
1. Do the same thing that P2741R3 does; if the type has .data() and .size() methods, treat it as a way to display the values and use them to render characters in the hover.
2. if the type has a constexpr ostream operator, constexpr formatter specialization, etc. use that.
3. __builtin_dump_struct or similar method of displaying the fields
I think #1 is the cleanest, and as more things become possible at constexpr this could be useful for debugging constexpr code more easily.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0VE-PqzYQ_zTOZQQCg5Nw4PB2V6u-W9VWvUYDHsB9BiPPkG3ep69Mst1tn9RbpUgBZjwzvz9jZHbjQtQq86TMywE3mUJsJUSeaJ0o2kMX7K193mKkRfxN6WeYwpUiQ1igQ3Y9XNFvxODdNwJ1LPqwsEA_YVT6izoWYB2vHm8gE7kIe5j-XOP9nKq-qGL_6VKZp68zjqTMi9LnSWTlFNavSr-OTqaty_swK_26McUMRbCfZlqElX5FZtofiqY-VqUps_Jo-qw25THrbD1kpj7jsdIFNY1Wurk3_Sm80ZXiP1GxxK0XBlwsBJkoQuj-oPTFhkXpkwBP4Q3wfwJAZuhOhaWsPpdFVldFlzUnXWao0ZS1rXDoT38D-G2iG1z6sHl7gYGQXedvsDFBWAjCADJFogQJhUZHDEOI74q4ZfwBRZnDS0hSAeNMIFNKkgkFftanuvylAhuIVfUEbtjT5LYSTMiQWxRU-qx0s1OXs_tOj_eZZAqWE88SCQWcADIgvCVfhM8WebdTKpFwyERzSom0WIq7r7CXJJVb9vxduFwVX3QOPwyFn_wWOPWeIawUUcKu-kd0CHFGEYrAK_UOvfuO4pLgz0DS549hUFKrKofLpducF7dc7Davl7tpIERgNzuP8YE5afCJ7jTc4MhbvtP9dWf4GyhdleB4j_eecCGW1DmxgAxziA8tGDrqw0ywBk5iE6B8QiGTY9jtAB2lkYfN3yWnbhvHNMJHch8s3Usn4_hbfrBtZZuqwQO15akumupkSnOY2jOeS6N7Y6gvzsZ05-FkO9vbrjnroSq7g2t1oU1RFbo81aY0eVUcbUO6N0jdUDeDqgua0fnc--uchzgeHPNGbambuj4fPHbkeb-GtF7oDfao0jrdSrFNh7JuG1nVhXcs_FFGnPj9_uo9LqNV5gV-Tev5e7JRWufdHzsH72scaY3EtAj-m7_DFn37H3ubuj7-sjWGVE7p133WtLoPMNdW_xUAAP__x4jIYQ">