| Issue |
129448
|
| Summary |
[clangd] Show Value on hover for objects representable at constexpr
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
torshepherd
|
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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs