llvm-project/clang/lib/Sema
John McCall 5149fbfd56 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
2013-02-22 03:52:55 +00:00
..
AnalysisBasedWarnings.cpp Replace CFGElement llvm::cast support to be well-defined. 2013-02-21 20:58:29 +00:00
AttributeList.cpp PR14922: when printing an attribute, use the real syntax of the attribute (GNU, C++11, MS Declspec) instead of hardcoded GNU syntax. 2013-01-24 16:46:58 +00:00
CMakeLists.txt PR14922: when printing an attribute, use the real syntax of the attribute (GNU, C++11, MS Declspec) instead of hardcoded GNU syntax. 2013-01-24 16:46:58 +00:00
CodeCompleteConsumer.cpp Allow the computation of the base priority for a declaration code completion result to consider the completion context 2013-01-31 04:52:16 +00:00
DeclSpec.cpp Add OpenCL samplers as Clang builtin types and check sampler related restrictions. 2013-02-07 10:55:47 +00:00
DelayedDiagnostic.cpp objective-C: when diagnosing deprecated/unavailable usage of 2012-09-21 20:46:37 +00:00
IdentifierResolver.cpp [Modules] Cope better with top-level declarations loaded after being declared in the current translation unit <rdar://problem/13189985>. 2013-02-11 18:16:18 +00:00
JumpDiagnostics.cpp s/CPlusPlus0x/CPlusPlus11/g 2013-01-02 11:42:31 +00:00
Makefile
MultiplexExternalSemaSource.cpp Simplify FindExternalVisibleDeclsByName by making it return a bool indicating 2013-02-07 03:30:24 +00:00
Scope.cpp Reapply r151638 and r151641. 2012-02-29 10:24:19 +00:00
ScopeInfo.cpp -Warc-repeated-use-of-weak: fix a use-of-uninitialized and add a test case. 2012-10-11 17:02:00 +00:00
Sema.cpp Include llvm::Optional in clang/Basic/LLVM.h 2013-02-20 22:23:23 +00:00
SemaAccess.cpp Only suppress instance context if a member is actually 2013-02-22 03:52:55 +00:00
SemaAttr.cpp Add a new 'type_visibility' attribute to allow users to 2013-02-20 01:54:26 +00:00
SemaCXXScopeSpec.cpp Use 'const Decl *' throughout code completion in Sema 2013-01-23 17:21:11 +00:00
SemaCast.cpp Diagnose loads of 'half' l-values in OpenCL. 2013-02-12 01:29:43 +00:00
SemaChecking.cpp Include llvm::Optional in clang/Basic/LLVM.h 2013-02-20 22:23:23 +00:00
SemaCodeComplete.cpp [preprocessor] Split the MacroInfo class into two separate concepts, MacroInfo class 2013-02-20 00:54:57 +00:00
SemaConsumer.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
SemaDecl.cpp Add a new 'type_visibility' attribute to allow users to 2013-02-20 01:54:26 +00:00
SemaDeclAttr.cpp Add a new 'type_visibility' attribute to allow users to 2013-02-20 01:54:26 +00:00
SemaDeclCXX.cpp Process and handle attributes on conditions and for loop variables. Process and 2013-02-20 19:22:51 +00:00
SemaDeclObjC.cpp Retain all hidden methods in the global method pool, because they may become visible <rdar://problem/13172858>. 2013-02-07 19:13:24 +00:00
SemaExceptionSpec.cpp Replace TypeLoc llvm::cast support to be well-defined. 2013-02-18 22:06:02 +00:00
SemaExpr.cpp Remove superfluous null pointer check. The pointer is used prior to this check. 2013-02-21 22:10:49 +00:00
SemaExprCXX.cpp The meat of this patch is in BuildCXXMemberCalLExpr where we make it use 2013-02-12 08:08:54 +00:00
SemaExprMember.cpp objective-C: When implementing custom accessor method for 2013-02-14 19:07:19 +00:00
SemaExprObjC.cpp objective-C arc: Diagnostic can not say to use bridge 2013-02-22 01:22:48 +00:00
SemaFixItUtils.cpp s/CPlusPlus0x/CPlusPlus11/g 2013-01-02 11:42:31 +00:00
SemaInit.cpp Replace TypeLoc llvm::cast support to be well-defined. 2013-02-18 22:06:02 +00:00
SemaLambda.cpp Remove useless 'llvm::' qualifier from names like StringRef and others that are 2013-01-12 19:30:44 +00:00
SemaLookup.cpp Preserve Sema::UndefinedInternals across PCH boundaries. Fixes 2013-01-26 00:35:08 +00:00
SemaObjCProperty.cpp objective-C: synthesize properties in order of their 2013-02-14 22:33:34 +00:00
SemaOverload.cpp Partially revert r175117 so that we don't break assumptions about how 2013-02-14 03:31:26 +00:00
SemaPseudoObject.cpp Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h. 2013-02-08 22:30:41 +00:00
SemaStmt.cpp Replace TypeLoc llvm::cast support to be well-defined. 2013-02-18 22:06:02 +00:00
SemaStmtAsm.cpp MCParser: Update method names per coding guidelines. 2013-02-20 22:25:15 +00:00
SemaStmtAttr.cpp PR15300: Support C++11 attributes on base-specifiers. We don't support any such 2013-02-19 23:47:15 +00:00
SemaTemplate.cpp Use None rather than Optional<T>() where possible. 2013-02-21 01:47:18 +00:00
SemaTemplateDeduction.cpp Improve 'failed template argument deduction' diagnostic for the case where we 2013-01-31 05:19:49 +00:00
SemaTemplateInstantiate.cpp Use None rather than Optional<T>() where possible. 2013-02-21 01:47:18 +00:00
SemaTemplateInstantiateDecl.cpp Use None rather than Optional<T>() where possible. 2013-02-21 01:47:18 +00:00
SemaTemplateVariadic.cpp Use None rather than Optional<T>() where possible. 2013-02-21 01:47:18 +00:00
SemaType.cpp Use None rather than Optional<T>() where possible. 2013-02-21 01:47:18 +00:00
TargetAttributesSema.cpp PR14922: when printing an attribute, use the real syntax of the attribute (GNU, C++11, MS Declspec) instead of hardcoded GNU syntax. 2013-01-24 16:46:58 +00:00
TargetAttributesSema.h Revert r170500. It over-zealously converted *ALL* things named Attributes, which is wrong here. 2012-12-20 19:22:21 +00:00
TreeTransform.h Use None rather than Optional<T>() where possible. 2013-02-21 01:47:18 +00:00
TypeLocBuilder.h Replace TypeLoc llvm::cast support to be well-defined. 2013-02-18 22:06:02 +00:00