aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Index/index-file.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2013-02-22 03:52:55 +0000
committerJohn McCall <rjmccall@apple.com>2013-02-22 03:52:55 +0000
commit5149fbfd56f2cc85e3f7d17887ef536e666b23b7 (patch)
treedde8f93f47ad911a248d8d4d01a974414d7e270f /clang/test/Index/index-file.cpp
parent04e7ff43a19692f857a60da16b0102b8c38569ba (diff)
downloadllvm-5149fbfd56f2cc85e3f7d17887ef536e666b23b7.zip
llvm-5149fbfd56f2cc85e3f7d17887ef536e666b23b7.tar.gz
llvm-5149fbfd56f2cc85e3f7d17887ef536e666b23b7.tar.bz2
Only suppress instance context if a member is actually
accessible in its declaring class; otherwise we might fail to apply [class.protected] when considering accessibility in derived classes. Noticed by inspection; <rdar://13270329>. I had an existing test wrong. Here's why it's wrong: Follow the rules (and notation) of [class.access]p5. The naming class (N) is B and the context (R) is D::getX. - 'x' as a member of B is protected, but R does not occur in a member or friend of a class derived from B. - There does exist a base class of B, A, which is accessible from R, and 'x' is accessible at R when named in A because 'x' as a member of A is protected and R occurs in a member of a class, D, that is derived from A; however, by [class.protected], the class of the object expression must be equal to or derived from that class, and A does not derive from D. llvm-svn: 175858
Diffstat (limited to 'clang/test/Index/index-file.cpp')
0 files changed, 0 insertions, 0 deletions