bloomberg / clang-p2996

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

Use of type splice in an unqualified using-enum-declarator #3

Closed katzdm closed 8 months ago

katzdm commented 8 months ago

Given a scoped enum

enum class EnumCls { A, B, C };

the using-enum-declatation

using enum [:^EnumCls:];

fails to compile. Note that if the scoped enum is specified using a qualified-id whose leading nested-name-specifier contains a splice, everything works okay.

struct S { enum class EnumCls { A, B, C }; };
using enum [:^S:]::EnumCls;

This suggests a special case is probably needed for the l_splice token (possibly also annot_splice? TBD) while parsing a using-enum-declarator.

katzdm commented 8 months ago

Closed by https://github.com/bloomberg/clang-p2996/commit/704c44e9f2a5c0bfe636fd869be2246ea4ae7d2e.