return NamingClass != 0;
}
- /// \brief Set whether the name lookup is triggered by a
- /// using declaration.
- void setUsingDeclaration(bool U) {
- UsingDeclaration = U;
- }
-
- /// \brief Returns whether the name lookup is triggered by a
- /// using declaration.
- bool isUsingDeclaration() const {
- return UsingDeclaration;
- }
-
/// \brief Returns the 'naming class' for this lookup, i.e. the
/// class which was looked into to find these results.
///
bool HideTags;
bool Diagnose;
-
- /// \brief True if the lookup is triggered by a using declaration.
- /// Necessary to handle a MSVC bug.
- bool UsingDeclaration;
};
/// \brief Consumes visible declarations found when searching for
MemberNonce _,
CXXRecordDecl *NamingClass,
DeclAccessPair FoundDecl,
- QualType BaseObjectType,
- bool IsUsingDecl = false)
- : AccessedEntity(Context, Member, NamingClass, FoundDecl, BaseObjectType),
- IsUsingDeclaration(IsUsingDecl) {
+ QualType BaseObjectType)
+ : AccessedEntity(Context, Member, NamingClass, FoundDecl, BaseObjectType) {
initialize();
}
DeclaringClass = DeclaringClass->getCanonicalDecl();
}
- bool IsUsingDeclaration : 1;
bool HasInstanceContext : 1;
mutable bool CalculatedInstanceContext : 1;
mutable const CXXRecordDecl *InstanceContext;
if (I.getAccess() != AS_public) {
AccessTarget Entity(Context, AccessedEntity::Member,
R.getNamingClass(), I.getPair(),
- R.getBaseObjectType(), R.isUsingDeclaration());
+ R.getBaseObjectType());
Entity.setDiag(diag::err_access);
CheckAccess(*this, R.getNameLoc(), Entity);
}
// Otherwise, look up the target name.
LookupResult R(*this, NameInfo, LookupOrdinaryName);
- R.setUsingDeclaration(true);
// Unlike most lookups, we don't always want to hide tag
// declarations: tag names are visible through the using declaration