hanchenye-llvm-project/clang/test/CXX
John McCall 5dadb65e07 Fix several problems with protected access control:
- The [class.protected] restriction is non-trivial for any instance
    member, even if the access lacks an object (for example, if it's
    a pointer-to-member constant).  In this case, it is equivalent to
    requiring the naming class to equal the context class.
  - The [class.protected] restriction applies to accesses to constructors
    and destructors.  A protected constructor or destructor can only be
    used to create or destroy a base subobject, as a direct result.
  - Several places were dropping or misapplying object information.

The standard could really be much clearer about what the object type is
supposed to be in some of these accesses.  Usually it's easy enough to
find a reasonable answer, but still, the standard makes a very confident
statement about accesses to instance members only being possible in
either pointer-to-member literals or member access expressions, which
just completely ignores concepts like constructor and destructor
calls, using declarations, unevaluated field references, etc.

llvm-svn: 154248
2012-04-07 03:04:20 +00:00
..
basic When determining whether an identifier followed by a '<' in a member 2012-03-10 23:52:41 +00:00
class Improve diagnostics for invalid use of non-static members / this: 2012-04-05 01:13:04 +00:00
class.access Fix several problems with protected access control: 2012-04-07 03:04:20 +00:00
class.derived Modify how the -verify flag works. Currently, the verification string and 2011-12-15 00:38:15 +00:00
conv Compute the promoted integer type of fixed-width enums correctly. Found by inspection. 2011-10-26 07:38:19 +00:00
dcl.dcl Temporary workaround for bug#12457: turn the 'constexpr function never produces 2012-04-05 18:57:10 +00:00
dcl.decl Dependent-sequence initialization of a single element can be direct 2012-04-04 04:06:51 +00:00
except In C++11 mode, when an integral constant expression is desired and we have a 2012-02-04 09:53:13 +00:00
expr Improve diagnostics for invalid use of non-static members / this: 2012-04-05 01:13:04 +00:00
lex Improve diagnostics for UCNs referring to control characters and members of the 2012-03-09 22:27:51 +00:00
over When computing the conversion sequence in overload resolution 2012-04-04 02:40:27 +00:00
special Improve diagnostics for invalid use of non-static members / this: 2012-04-05 01:13:04 +00:00
stmt.stmt Support decltype as a simple-type-specifier. 2012-01-24 05:47:35 +00:00
temp Implement support for null non-type template arguments for non-type 2012-04-06 22:40:38 +00:00