15 #ifndef LLVM_CLANG_AST_UNRESOLVEDSET_H 16 #define LLVM_CLANG_AST_UNRESOLVEDSET_H 21 #include "llvm/ADT/SmallVector.h" 22 #include "llvm/ADT/iterator.h" 33 UnresolvedSetIterator, DeclAccessPair *,
34 std::random_access_iterator_tag, NamedDecl *,
35 std::ptrdiff_t, NamedDecl *, NamedDecl *> {
41 : iterator_adaptor_base(Iter) {}
101 for (DeclsTy::iterator I = decls().begin(), E = decls().end(); I != E; ++I)
102 if (I->getDecl() == Old)
103 return (I->setDecl(New),
true);
115 void erase(
unsigned I) { decls()[I] = decls().pop_back_val(); }
124 bool empty()
const {
return decls().empty(); }
125 unsigned size()
const {
return decls().size(); }
136 return *
reinterpret_cast<DeclsTy*
>(
this);
139 return *
reinterpret_cast<const DeclsTy*
>(
this);
152 #endif // LLVM_CLANG_AST_UNRESOLVEDSET_H void replace(iterator I, NamedDecl *New)
Replaces the declaration at the given iterator with the new one, preserving the original access bits...
const DeclAccessPair & operator[](unsigned I) const
const_iterator begin() 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)
const DeclAccessPair & getPair() const
void addDecl(NamedDecl *D, AccessSpecifier AS)
The iterator over UnresolvedSets.
NamedDecl * operator->() const
void setDecl(NamedDecl *ND) const
friend class UnresolvedSetImpl
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...
AccessSpecifier getAccess() const
A set of unresolved declarations.
void append(iterator I, iterator E)
NamedDecl * operator*() 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...
void addDecl(NamedDecl *D)
NamedDecl * getDecl() const
Defines various enumerations that describe declaration and type specifiers.
A POD class for pairing a NamedDecl* with an access specifier.
Dataflow Directional Tag Classes.
A set of unresolved declarations.
An UnresolvedSet-like class which uses the ASTContext's allocator.
const_iterator end() const
This represents a decl that may have a name.
void setAccess(AccessSpecifier AS)
DeclAccessPair & operator[](unsigned I)