[Bug 15401] New: static members of structs and classes have incorrect visibility

Bug ID 15401
Summary static members of structs and classes have incorrect visibility
Product lldb
Version unspecified
Hardware PC
OS All
Status NEW
Severity enhancement
Priority P
Component All Bugs
Assignee lldb-dev@cs.uiuc.edu
Reporter ashok.thirumurthi@intel.com
Classification Unclassified

Expression evaluation using static members of structs/classes such as:
  struct my_struct {
    static int my_static;
  };
  int my_struct::my_static = 2;
  my_struct test;

  expression my_struct::my_static
  expression test.my_static

results in the error 
  'no member named 'my_static' in 'my_struct'"

Reproducer:
  ./dotest.py -A x86_64 -v lang/cpp/static_members

As illustrated by the above test, an attempt to 'print my_static' (outside of
the scope of my_struct) succeeds even though it should be visible only as
my_struct::my_static.

As illustrated by the above test, the struct layout performed during expression
evaluation is 4 bytes (short + char + default alignment) rather than 24 bytes.