15 #ifndef LLVM_CLANG_AST_UNRESOLVEDSET_H
16 #define LLVM_CLANG_AST_UNRESOLVEDSET_H
20 #include "llvm/ADT/ArrayRef.h"
21 #include "llvm/ADT/SmallVector.h"
22 #include "llvm/ADT/iterator.h"
29 UnresolvedSetIterator, DeclAccessPair *,
30 std::random_access_iterator_tag, NamedDecl *,
31 std::ptrdiff_t, NamedDecl *, NamedDecl *> {
37 : iterator_adaptor_base(Iter) {}
95 if (
I->getDecl() == Old)
96 return (
I->setDecl(New),
true);
108 void erase(
unsigned I) { decls()[
I] = decls().pop_back_val(); }
117 bool empty()
const {
return decls().empty(); }
118 unsigned size()
const {
return decls().size(); }
129 return *
reinterpret_cast<DeclsTy*
>(
this);
131 const DeclsTy &decls()
const {
132 return *
reinterpret_cast<const DeclsTy*
>(
this);
void replace(iterator I, NamedDecl *New)
Replaces the declaration at the given iterator with the new one, preserving the original access bits...
void setDecl(NamedDecl *ND) const
void setAccess(iterator I, AccessSpecifier AS)
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
void setAccess(AccessSpecifier AS)
UnresolvedSetIterator const_iterator
const_iterator begin() const
const DeclAccessPair & operator[](unsigned I) const
void addDecl(NamedDecl *D, AccessSpecifier AS)
NamedDecl * operator->() const
The iterator over UnresolvedSets.
void replace(iterator I, NamedDecl *New, AccessSpecifier AS)
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
void set_size(unsigned N)
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
A set of unresolved declarations.
void append(iterator I, iterator E)
detail::InMemoryDirectory::const_iterator I
NamedDecl * getDecl() const
bool replace(const NamedDecl *Old, NamedDecl *New)
Replaces the given declaration with the new one, once.
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr...
const TemplateArgument * iterator
const_iterator end() const
void addDecl(NamedDecl *D)
const DeclAccessPair & getPair() const
A POD class for pairing a NamedDecl* with an access specifier.
AccessSpecifier getAccess() const
A set of unresolved declarations.
detail::InMemoryDirectory::const_iterator E
An UnresolvedSet-like class which uses the ASTContext's allocator.
NamedDecl * operator*() const
NamedDecl - This represents a decl with a name.
DeclAccessPair & operator[](unsigned I)
UnresolvedSetIterator iterator