]> granicus.if.org Git - clang/commit
When elevating access along an inheritance path, initialize the computed
authorJohn McCall <rjmccall@apple.com>
Thu, 18 Mar 2010 23:49:19 +0000 (23:49 +0000)
committerJohn McCall <rjmccall@apple.com>
Thu, 18 Mar 2010 23:49:19 +0000 (23:49 +0000)
commit7aceaf8cee77c98478e8934dc283910292711a7e
treefaa353d4e864e147baf59653f96506f1d617c995
parentac91b4c7063615da6797031f5ac46a906e6b8166
When elevating access along an inheritance path, initialize the computed
access to the (elevated) access of the accessed declaration, if applicable,
rather than plunking that access onto the end after we've calculated the
inheritance access.

Also, being a friend of a derived class gives you public access to its
members (subject to later modification by further inheritance);  it does
not simply ignore a single location of restricted inheritance.

Also, when computing the best unprivileged path to a subobject, preserve
the information that the worst path might be AS_none (forbidden) rather
than a minimum of AS_private.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98899 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaAccess.cpp
lib/Sema/SemaLookup.cpp
test/CXX/class.access/class.friend/p1.cpp
test/CXX/class.access/p4.cpp
test/SemaCXX/access-base-class.cpp