asutton/clang

No support for reflecting declaration specifiers

Jenny-fa opened this issue · 1 comments

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) {
          ^