clang
clang copied to clipboard
No support for reflecting declaration specifiers
Despite __reflect_specifiers()
being a recognized reflection trait intrinsic, attempting to invoke it in C++ code results in the diag::err_reflection_not_supported
error message. (To elaborate, in lib/Sema/SemaReflect.cpp, the switch statement in Reflector::Reflect(ReflectionTrait, Decl *)
does not handle the URT_ReflectSpecifiers
enumeration value, causing control to fall through to the end of the function where the diagnostic is emitted.) This means that there is currently no support for reflecting the specifiers of a declaration.
Incidentally, this was discovered, while building Clang, through the following compiler warning:
[…]/clang/lib/Sema/SemaReflect.cpp:459:11: warning: enumeration value
'URT_ReflectSpecifiers' not handled in switch [-Wswitch]
switch (RT) {
^
Known issue. Requires a lot of work to fix it.
On Mon, Jan 16, 2017 at 1:44 PM Jennifer Yao [email protected] wrote:
Despite __reflect_specifiers() being a recognized reflection trait intrinsic, attempting to invoke it in C++ code results in the diag::err_reflection_not_supported error message. (To elaborate, in lib/Sema/SemaReflect.cpp https://github.com/asutton/clang/blob/80edcb78ef11f402a58132c3029be8675423d4f8/lib/Sema/SemaReflect.cpp#L459, the switch statement in Reflector::Reflect(ReflectionTrait, Decl *) does not handle the URT_ReflectSpecifiers enumeration value, causing control to fall through to the end of the function where the diagnostic is emitted.) This means that there is currently no support for reflecting the specifiers of a declaration.
Incidentally, this was discovered, while building Clang, through the following compiler warning:
[…]/clang/lib/Sema/SemaReflect.cpp:459:11: warning: enumeration value 'URT_ReflectSpecifiers' not handled in switch [-Wswitch] switch (RT) { ^
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/asutton/clang/issues/5, or mute the thread https://github.com/notifications/unsubscribe-auth/AAi1rGl7P-5WMPlzWr5noiFqUokh8Vjjks5rS7qjgaJpZM4Lk3xP .
-- Andrew Sutton