initializing a new one every time a copy is needed.
llvm-svn: 221724
private:
template <unsigned N> friend class UnresolvedSet;
UnresolvedSetImpl() {}
- UnresolvedSetImpl(const UnresolvedSetImpl &) LLVM_DELETED_FUNCTION;
+ UnresolvedSetImpl(const UnresolvedSetImpl &) {};
public:
// We don't currently support assignment through this iterator, so we might
: ResultKind(NotFound),
Paths(nullptr),
NamingClass(nullptr),
- SemaRef(SemaRef),
+ SemaPtr(&SemaRef),
NameInfo(NameInfo),
LookupKind(LookupKind),
IDNS(0),
: ResultKind(NotFound),
Paths(nullptr),
NamingClass(nullptr),
- SemaRef(SemaRef),
+ SemaPtr(&SemaRef),
NameInfo(Name, NameLoc),
LookupKind(LookupKind),
IDNS(0),
: ResultKind(NotFound),
Paths(nullptr),
NamingClass(nullptr),
- SemaRef(Other.SemaRef),
+ SemaPtr(Other.SemaPtr),
NameInfo(Other.NameInfo),
LookupKind(Other.LookupKind),
IDNS(Other.IDNS),
if (!D->isInIdentifierNamespace(IDNS))
return nullptr;
- if (isHiddenDeclarationVisible() || isVisible(SemaRef, D))
+ if (isHiddenDeclarationVisible() || isVisible(getSema(), D))
return D;
return getAcceptableDeclSlow(D);
/// \brief Get the Sema object that this lookup result is searching
/// with.
- Sema &getSema() const { return SemaRef; }
+ Sema &getSema() const { return *SemaPtr; }
/// A class for iterating through a result set and possibly
/// filtering out results. The results returned are possibly
private:
void diagnose() {
if (isAmbiguous())
- SemaRef.DiagnoseAmbiguousLookup(*this);
- else if (isClassLookup() && SemaRef.getLangOpts().AccessControl)
- SemaRef.CheckLookupAccess(*this);
+ getSema().DiagnoseAmbiguousLookup(*this);
+ else if (isClassLookup() && getSema().getLangOpts().AccessControl)
+ getSema().CheckLookupAccess(*this);
}
void setAmbiguous(AmbiguityKind AK) {
QualType BaseObjectType;
// Parameters.
- Sema &SemaRef;
+ Sema *SemaPtr;
DeclarationNameInfo NameInfo;
SourceRange NameContextRange;
Sema::LookupNameKind LookupKind;
}
void LookupResult::configure() {
- IDNS = getIDNS(LookupKind, SemaRef.getLangOpts().CPlusPlus,
+ IDNS = getIDNS(LookupKind, getSema().getLangOpts().CPlusPlus,
isForRedeclaration());
// If we're looking for one of the allocation or deallocation
case OO_Delete:
case OO_Array_New:
case OO_Array_Delete:
- SemaRef.DeclareGlobalNewDelete();
+ getSema().DeclareGlobalNewDelete();
break;
default:
// up being declared.
if (IdentifierInfo *Id = NameInfo.getName().getAsIdentifierInfo()) {
if (unsigned BuiltinID = Id->getBuiltinID()) {
- if (!SemaRef.Context.BuiltinInfo.isPredefinedLibFunction(BuiltinID))
+ if (!getSema().Context.BuiltinInfo.isPredefinedLibFunction(BuiltinID))
AllowHidden = true;
}
}
// canonical type.
if (TypeDecl *TD = dyn_cast<TypeDecl>(D)) {
if (!TD->getDeclContext()->isRecord()) {
- QualType T = SemaRef.Context.getTypeDeclType(TD);
- if (!UniqueTypes.insert(SemaRef.Context.getCanonicalType(T))) {
+ QualType T = getSema().Context.getTypeDeclType(TD);
+ if (!UniqueTypes.insert(getSema().Context.getCanonicalType(T))) {
// The type is not unique; pull something off the back and continue
// at this index.
Decls[I] = Decls[--N];
}
NamedDecl *LookupResult::getAcceptableDeclSlow(NamedDecl *D) const {
- return findAcceptableDecl(SemaRef, D);
+ return findAcceptableDecl(getSema(), D);
}
/// @brief Perform unqualified name lookup starting from a given