bloomberg / clang-p2996

Experimental clang support for WG21 P2996 (Reflection).
https://github.com/bloomberg/clang-p2996/tree/p2996/P2996.md
51 stars 8 forks source link

Crash when reflecting a splice of a value #81

Closed katzdm closed 1 month ago

katzdm commented 1 month ago

The following program yields an ICE:

#include <experimental/meta>

constexpr auto s = ^[:std::meta::reflect_value(3):];

The bug was introduced during a recent refactor of reflect-expressions. This is probably a good opportunity to revisit how we parse and represent splices, and perhaps do a little refactoring.

katzdm commented 1 month ago

The whole ^[:expr:] syntax just adds wording and parsing complexity, while delivering basically zero value. Since it hasn't even been added to the paper, we're just going to refrain from doing so. I'll remove support for the syntax, rather than explicitly fix this bug.

katzdm commented 1 month ago

Removed support for this syntax in f26b7a.