14#ifndef LLVM_CLANG_AST_ASTUNRESOLVEDSET_H
15#define LLVM_CLANG_AST_ASTUNRESOLVEDSET_H
33 struct DeclsTy :
ASTVector<DeclAccessPair> {
37 bool isLazy()
const {
return getTag(); }
38 void setLazy(
bool Lazy) {
setTag(Lazy); }
69 if (I->getDecl() == Old) {
78 if (I == Decls.size() - 1)
81 Decls[I] = Decls.pop_back_val();
86 bool empty()
const {
return Decls.empty(); }
87 unsigned size()
const {
return Decls.size(); }
94 Decls.append(
C, I.I,
E.I);
110 if (Impl.Decls.isLazy())
111 getFromExternalSource(
C);
118 assert(Impl.
empty() || Impl.Decls.isLazy());
119 Impl.Decls.setLazy(
true);
Defines various enumerations that describe declaration and type specifiers.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
An UnresolvedSet-like class which uses the ASTContext's allocator.
void append(ASTContext &C, iterator I, iterator E)
const DeclAccessPair & operator[](unsigned I) const
bool replace(const NamedDecl *Old, NamedDecl *New, AccessSpecifier AS)
Replaces the given declaration with the new one, once.
UnresolvedSetIterator iterator
UnresolvedSetIterator const_iterator
const_iterator end() const
ASTUnresolvedSet(ASTContext &C, unsigned N)
void reserve(ASTContext &C, unsigned N)
void addLazyDecl(ASTContext &C, GlobalDeclID ID, AccessSpecifier AS)
const_iterator begin() const
void addDecl(ASTContext &C, NamedDecl *D, AccessSpecifier AS)
ASTUnresolvedSet()=default
DeclAccessPair & operator[](unsigned I)
A POD class for pairing a NamedDecl* with an access specifier.
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
static DeclAccessPair makeLazy(uint64_t ID, AccessSpecifier AS)
An UnresolvedSet-like class that might not have been loaded from the external AST source yet.
void reserve(ASTContext &C, unsigned N)
void addLazyDecl(ASTContext &C, GlobalDeclID ID, AccessSpecifier AS)
ASTUnresolvedSet & get(ASTContext &C) const
This represents a decl that may have a name.
The iterator over UnresolvedSets.
The JSON file list parser is used to communicate input to InstallAPI.
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...