Home | History | Annotate | Download | only in AST

Lines Matching defs:DeclContext

10 // This file implements the Decl and DeclContext classes.
76 DeclContext *Parent, std::size_t Extra) {
122 const char *DeclContext::getDeclKindName() const {
199 const DeclContext *Decl::getParentFunctionOrMethod() const {
200 for (const DeclContext *DC = getDeclContext();
241 void Decl::setDeclContext(DeclContext *DC) {
245 void Decl::setLexicalDeclContext(DeclContext *DC) {
257 void Decl::setDeclContextsImpl(DeclContext *SemaDC, DeclContext *LexicalDC,
270 const DeclContext *LDC = getLexicalDeclContext();
282 const DeclContext *DC = getDeclContext();
300 DeclContext *DC = getDeclContext();
683 Decl *Decl::castFromDeclContext (const DeclContext *D) {
689 return static_cast<NAME##Decl*>(const_cast<DeclContext*>(D));
696 return static_cast<NAME##Decl*>(const_cast<DeclContext*>(D));
698 llvm_unreachable("a decl that inherits DeclContext isn't handled");
702 DeclContext *Decl::castToDeclContext(const Decl *D) {
717 llvm_unreachable("a decl that inherits DeclContext isn't handled");
753 // as DeclContext (?).
768 static Decl::Kind getKind(const DeclContext *DC) { return DC->getDeclKind(); }
788 /// Starting at a given context (a Decl or DeclContext), look for a
814 Decl *DeclContext::getNonClosureAncestor() {
819 // DeclContext Implementation
822 bool DeclContext::classof(const Decl *D) {
840 DeclContext::~DeclContext() { }
848 DeclContext *DeclContext::getLookupParent() {
858 bool DeclContext::isInlineNamespace() const {
863 bool DeclContext::isStdNamespace() const {
879 bool DeclContext::isDependentContext() const {
905 // DeclContext. A context within it (such as a lambda-expression)
911 bool DeclContext::isTransparentContext() const {
920 static bool isLinkageSpecContext(const DeclContext *DC,
930 bool DeclContext::isExternCContext() const {
934 bool DeclContext::isExternCXXContext() const {
938 bool DeclContext::Encloses(const DeclContext *DC) const {
948 DeclContext *DeclContext::getPrimaryContext() {
955 // There is only one DeclContext for these entities.
1006 "Unknown DeclContext kind");
1012 DeclContext::collectAllContexts(SmallVectorImpl<DeclContext *> &Contexts){
1029 DeclContext::BuildDeclChain(ArrayRef<Decl*> Decls,
1053 void DeclContext::reconcileExternalVisibleStorage() const {
1065 DeclContext::LoadLexicalDeclsFromExternalStorage() const {
1069 // Notify that we have a DeclContext that is initializing.
1098 DeclContext::lookup_result
1099 ExternalASTSource::SetNoExternalVisibleDeclsForName(const DeclContext *DC,
1110 return DeclContext::lookup_result();
1113 DeclContext::lookup_result
1114 ExternalASTSource::SetExternalVisibleDeclsForName(const DeclContext *DC,
1162 DeclContext::decl_iterator DeclContext::decls_begin() const {
1168 bool DeclContext::decls_empty() const {
1175 bool DeclContext::containsDecl(Decl *D) const {
1180 void DeclContext::removeDecl(Decl *D) {
1226 void DeclContext::addHiddenDecl(Decl *D) {
1230 "Decl already inserted into a DeclContext");
1252 void DeclContext::addDecl(Decl *D) {
1260 void DeclContext::addDeclInternal(Decl *D) {
1295 /// declarations in this DeclContext (and any other contexts linked
1301 StoredDeclsMap *DeclContext::buildLookup() {
1307 SmallVector<DeclContext *, 2> Contexts;
1332 /// DeclContext, a DeclContext linked to it, or a transparent context
1334 void DeclContext::buildLookupImpl(DeclContext *DCtx, bool Internal) {
1354 if (DeclContext *InnerCtx = dyn_cast<DeclContext>(D))
1362 DeclContext::lookup_result
1363 DeclContext::lookup(DeclarationName Name) const {
1367 const DeclContext *PrimaryContext = getPrimaryContext();
1388 Map = const_cast<DeclContext*>(this)->buildLookup();
1412 Map = const_cast<DeclContext*>(this)->buildLookup();
1424 DeclContext::lookup_result
1425 DeclContext::noload_lookup(DeclarationName Name) {
1429 DeclContext *PrimaryContext = getPrimaryContext();
1437 SmallVector<DeclContext *, 2> Contexts;
1453 void DeclContext::localUncachedLookup(DeclarationName Name,
1490 DeclContext *DeclContext::getRedeclContext() {
1491 DeclContext *Ctx = this;
1498 DeclContext *DeclContext::getEnclosingNamespaceContext() {
1499 DeclContext *Ctx = this;
1506 RecordDecl *DeclContext::getOuterLexicalRecordContext() {
1509 DeclContext *DC = this;
1517 bool DeclContext::InEnclosingNamespaceSetOf(const DeclContext *O) const {
1535 void DeclContext::makeDeclVisibleInContext(NamedDecl *D) {
1536 DeclContext *PrimaryDC = this->getPrimaryContext();
1537 DeclContext *DeclDC = D->getDeclContext()->getPrimaryContext();
1543 void DeclContext::makeDeclVisibleInContextWithFlags(NamedDecl *D, bool Internal,
1589 void DeclContext::makeDeclVisibleInContextImpl(NamedDecl *D, bool Internal) {
1635 UsingDirectiveDecl *DeclContext::udir_iterator::operator*() const {
1641 DeclContext::udir_range DeclContext::using_directives() const {
1652 StoredDeclsMap *DeclContext::CreateStoredDeclsMap(ASTContext &C) const {
1692 DeclContext *Parent,