||C++ static data members, C++17 inline variables
Section Appendix A, pg 258
For DW_TAG_variable we list lots of attributes that aren't listed for
DW_TAG_member, in particular:
For C++98 .. C++14, I think at least DW_AT_const_value and DW_AT_const_expr
should be listed as allowed on DW_TAG_member, if we have say:
static constexpr int a = 9;
then even when we don't have a definition of A::a in the current TU, it
is still desirable to tell the consumers that A::a is constexpr and what
constant value it has - if such a static data member is never odr-used,
it might not have the definition anywhere.
For C++17, I believe we need far more attributes than that. First of
all, variables can be explicitly or implicitly inline, so we should allow
DW_AT_inline DW_INL_declared_inlined on variables with explicit inline
keyword and DW_AT_inline DW_INL_inlined for the implicit ones (static
constexpr data members).
And, as inline (explicitly or implicitly) static data members have their
definitions in the class rather than somewhere else, we need to allow
on DW_TAG_member (in addition to DW_TAG_inline on DW_TAG_variable) - I think:
don't make sense for DW_TAG_member - start_scope because static data members
are global variables and thus should be in scope everywhere.
See issue 161118.1 regarding DW_TAG_member. Detailed proposal needed for C++17.