Lines Matching refs:EC
100 // We want to add canonical declarations to the EC lists for
408 const EffectiveContext &EC,
410 if (EC.includesClass(Friend))
413 if (EC.isDependent()) {
414 for (const CXXRecordDecl *Context : EC.Records) {
424 const EffectiveContext &EC,
427 return MatchesFriend(S, EC, cast<CXXRecordDecl>(RT->getDecl()));
439 const EffectiveContext &EC,
446 I = EC.Records.begin(), E = EC.Records.end(); I != E; ++I) {
468 if (!EC.isDependent())
492 const EffectiveContext &EC,
497 I = EC.Functions.begin(), E = EC.Functions.end(); I != E; ++I) {
501 if (EC.isDependent() && MightInstantiateTo(S, *I, Friend))
511 const EffectiveContext &EC,
513 if (EC.Functions.empty()) return AR_inaccessible;
518 I = EC.Functions.begin(), E = EC.Functions.end(); I != E; ++I) {
531 if (EC.isDependent() && MightInstantiateTo(S, FTD, Friend))
541 const EffectiveContext &EC,
549 return MatchesFriend(S, EC, T->getType()->getCanonicalTypeUnqualified());
557 return MatchesFriend(S, EC, cast<ClassTemplateDecl>(Friend));
560 return MatchesFriend(S, EC, cast<FunctionTemplateDecl>(Friend));
563 return MatchesFriend(S, EC, cast<CXXRecordDecl>(Friend));
566 return MatchesFriend(S, EC, cast<FunctionDecl>(Friend));
570 const EffectiveContext &EC,
576 switch (MatchesFriend(S, EC, Friend)) {
599 const EffectiveContext &EC;
607 ProtectedFriendContext(Sema &S, const EffectiveContext &EC,
610 : S(S), EC(EC), NamingClass(NamingClass),
620 switch (GetFriendKind(S, EC, CurPath[I])) {
684 /// Search for a class P that EC is a friend of, under the constraint
710 static AccessResult GetProtectedFriendKind(Sema &S, const EffectiveContext &EC,
720 if (!InstanceContext) return GetFriendKind(S, EC, NamingClass);
722 ProtectedFriendContext PRC(S, EC, InstanceContext, NamingClass);
729 const EffectiveContext &EC,
742 I = EC.Records.begin(), E = EC.Records.end(); I != E; ++I) {
743 // All the declarations in EC have been canonicalized, so pointer
752 if (EC.isDependent() && MightInstantiateTo(ECRecord, NamingClass))
792 if (S.getLangOpts().MSVCCompat && !EC.Functions.empty())
793 if (CXXMethodDecl* MD = dyn_cast<CXXMethodDecl>(EC.Functions.front()))
852 switch (GetProtectedFriendKind(S, EC, InstanceContext, NamingClass)) {
860 switch (GetFriendKind(S, EC, NamingClass)) {
927 const EffectiveContext &EC,
973 switch (HasAccess(S, EC, NC, PathAccess, Target)) {
1018 static bool TryDiagnoseProtectedAccess(Sema &S, const EffectiveContext &EC,
1029 I = EC.Records.begin(), E = EC.Records.end(); I != E; ++I) {
1094 const EffectiveContext &EC,
1100 TryDiagnoseProtectedAccess(S, EC, entity))
1151 const EffectiveContext &EC,
1168 switch (HasAccess(S, EC, declaringClass, accessSoFar, entity)) {
1179 return diagnoseBadDirectAccess(S, EC, entity);
1188 CXXBasePath &path = *FindBestPath(S, EC, entity, accessSoFar, paths);
1211 switch (HasAccess(S, EC, derivingClass, accessSoFar, entity)) {
1234 return diagnoseBadDirectAccess(S, EC, entity);
1260 const EffectiveContext &EC,
1271 DiagnoseAccessPath(S, EC, Entity);
1315 const EffectiveContext &EC,
1328 switch (HasAccess(S, EC, NamingClass, UnprivilegedAccess, Entity)) {
1351 // Determine if the declaration is accessible from EC when named
1357 switch (HasAccess(S, EC, DeclaringClass, FinalAccess, Entity)) {
1359 // Target is accessible at EC when named in its declaring class.
1381 CXXBasePath *Path = FindBestPath(S, EC, Entity, FinalAccess, Paths);
1393 const EffectiveContext &EC,
1396 assert(EC.isDependent() && "delaying non-dependent access");
1397 DeclContext *DC = EC.getInnerContext();
1411 const EffectiveContext &EC,
1416 switch (IsAccessible(S, EC, Entity)) {
1418 DelayDependentAccess(S, EC, Loc, Entity);
1426 DiagnoseBadAccess(S, Loc, EC, Entity);
1459 EffectiveContext EC(S.CurContext);
1460 switch (CheckEffectiveAccess(S, EC, Loc, Entity)) {
1483 EffectiveContext EC(DC);
1487 if (CheckEffectiveAccess(*this, EC, DD.Loc, Target) == ::AR_inaccessible)
1775 EffectiveContext EC(CurContext);
1776 switch (CheckEffectiveAccess(*this, EC, target->getLocation(), entity)) {
1877 EffectiveContext EC(CurContext);
1878 return ::IsAccessible(*this, EC, Entity) != ::AR_inaccessible;