Lines Matching defs:CurContext

752   DeclContext *const DC = CurContext;
922 isDeclInScope(*(Previous.end() - 1), CurContext, S, false)) {
953 CurContext->addHiddenDecl(New);
2645 return dyn_cast_or_null<CXXRecordDecl>(CurContext);
2665 CurDecl = dyn_cast_or_null<CXXRecordDecl>(CurContext);
3188 AccessSpecDecl *ASDecl = AccessSpecDecl::Create(Context, Access, CurContext,
3190 CurContext->addHiddenDecl(ASDecl);
3409 assert(isa<CXXRecordDecl>(CurContext));
3416 if (cast<CXXRecordDecl>(CurContext)->isInterface()) {
3572 Member = HandleMSProperty(S, cast<CXXRecordDecl>(CurContext), Loc, D,
3578 Member = HandleField(S, cast<CXXRecordDecl>(CurContext), Loc, D,
3584 CheckShadowInheritedFields(Loc, Name, cast<CXXRecordDecl>(CurContext));
3642 for (const auto *D : cast<CXXRecordDecl>(CurContext)->decls()) {
4678 if (CurContext->isDependentContext())
4707 bool Dependent = CurContext->isDependentContext() &&
4816 if (CurContext->isDependentContext())
8585 S.Context, S.CurContext, Loc, Loc, IterationVarName, SizeType,
8686 VarDecl::Create(S.Context, S.CurContext, Loc, Loc, Name, R,
11483 if (!CurContext->getRedeclContext()->Equals(
11649 CurContext->getRedeclContext()->isTranslationUnit() &&
11668 LookupQualifiedName(R, CurContext->getRedeclContext());
11676 CurContext->getRedeclContext()->isTranslationUnit())
11689 CurContext->getRedeclContext()->isTranslationUnit()) {
11705 DeclContext *Parent = CurContext->getRedeclContext();
11719 Context, CurContext, IsInline, StartLoc, Loc, II, PrevNS, IsNested);
11740 DeclContext *Parent = CurContext->getRedeclContext();
11747 CurContext->addDecl(Namespc);
12113 static bool IsUsingDirectiveInToplevelContext(DeclContext *CurContext) {
12114 switch (CurContext->getDeclKind()) {
12118 return IsUsingDirectiveInToplevelContext(CurContext->getParent());
12255 while (CommonAncestor && !CommonAncestor->Encloses(CurContext))
12258 UDir = UsingDirectiveDecl::Create(Context, CurContext, UsingLoc, NamespcLoc,
12262 if (IsUsingDirectiveInToplevelContext(CurContext) &&
12464 if (!getLangOpts().CPlusPlus11 && CurContext->isRecord())
12475 if (cast<CXXRecordDecl>(CurContext)->isProvablyNotDerivedFrom(OrigRec)) {
12476 if (OrigDC == CurContext) {
12487 << Using->getQualifier() << cast<CXXRecordDecl>(CurContext)
12525 CurContext,
12577 if (CurContext->isRecord())
12642 isVirtualDirectBase(cast<CXXRecordDecl>(CurContext),
12645 Context, CurContext, Using->getLocation(), Using, Orig, IsVirtualBase);
12647 Shadow = UsingShadowDecl::Create(Context, CurContext, BUD->getLocation(),
12661 CurContext->addDecl(Shadow);
12793 if (!isDeclInScope(D, CurContext, S))
12799 else if (!CurContext->isFunctionOrMethod() && D->isLocalExternDecl() &&
12823 if (auto *RD = dyn_cast<CXXRecordDecl>(CurContext))
12837 if (CurContext->isRecord())
12838 LookupQualifiedName(Previous, CurContext);
12879 D = UnresolvedUsingTypenameDecl::Create(Context, CurContext,
12885 D = UnresolvedUsingValueDecl::Create(Context, CurContext, UsingLoc,
12889 CurContext->addDecl(D);
12896 UsingDecl::Create(Context, CurContext, UsingLoc, QualifierLoc,
12899 CurContext->addDecl(UD);
12922 if (CurContext->isRecord()) {
12924 Context.getTypeDeclType(cast<CXXRecordDecl>(CurContext)));
12935 R.addDecl(UnresolvedUsingIfExistsDecl::Create(Context, CurContext, UsingLoc,
12950 CurContext->isStdNamespace() &&
12955 dyn_cast<CXXRecordDecl>(CurContext));
12987 auto *CurClass = cast<CXXRecordDecl>(CurContext);
13071 if (CurContext->getRedeclContext()->isRecord()) {
13093 UsingEnumDecl *UD = UsingEnumDecl::Create(Context, CurContext, UsingLoc,
13096 CurContext->addDecl(UD);
13126 UsingPackDecl::Create(Context, CurContext, InstantiatedFrom, Expansions);
13128 CurContext->addDecl(UPD);
13138 CXXRecordDecl *TargetClass = cast<CXXRecordDecl>(CurContext);
13173 if (!CurContext->getRedeclContext()->isRecord()) {
13271 if (!CurContext->isRecord()) {
13392 if (cast<CXXRecordDecl>(CurContext)->isProvablyNotDerivedFrom(
13401 if (CurContext == NamedContext) {
13411 << SS.getScopeRep() << cast<CXXRecordDecl>(CurContext)
13440 if (!cast<CXXRecordDecl>(CurContext)->forallBases(Collect))
13458 << cast<CXXRecordDecl>(CurContext)
13478 if (DiagnoseClassNameShadow(CurContext, NameInfo))
13503 TypeAliasDecl *NewTD = TypeAliasDecl::Create(Context, CurContext, UsingLoc,
13542 FilterLookupForScope(Previous, CurContext, S, /*ConsiderLinkage*/false,
13591 TypeAliasTemplateDecl::Create(Context, CurContext, UsingLoc,
13611 ActOnTypedefNameDecl(S, CurContext, NewTD, Previous, Redeclaration);
13654 FilterLookupForScope(PrevR, CurContext, S, /*ConsiderLinkage*/false,
13687 NamespaceAliasDecl::Create(Context, CurContext, NamespaceLoc, AliasLoc,
14345 if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(CurContext)) {
14762 VarDecl *IterationVar = VarDecl::Create(S.Context, S.CurContext, Loc, Loc,
16788 LinkageSpecDecl *D = LinkageSpecDecl::Create(Context, CurContext, ExternLoc,
16806 CurContext->addDecl(D);
16834 Decl *ED = EmptyDecl::Create(Context, CurContext, SemiLoc);
16839 CurContext->addDecl(ED);
16920 VarDecl *ExDecl = VarDecl::Create(Context, CurContext, StartLoc, Loc, Name,
16997 if (isDeclInScope(PrevDecl, CurContext, S)) {
17022 CurContext->addDecl(ExDecl);
17426 getLangOpts().CPlusPlus && CurContext->isDependentContext();
17476 Decl *Decl = StaticAssertDecl::Create(Context, CurContext, StaticAssertLoc,
17480 CurContext->addDecl(Decl);
17570 FriendDecl::Create(Context, CurContext, NameLoc, TSI, FriendLoc,
17573 CurContext->addDecl(Friend);
17600 << SS.getScopeRep() << SS.getRange() << cast<CXXRecordDecl>(CurContext);
17610 FriendDecl::Create(Context, CurContext, NameLoc, TSI, FriendLoc,
17614 CurContext->addDecl(Friend);
17719 D = FriendTemplateDecl::Create(Context, CurContext, Loc, TempParams, TSI,
17722 D = FriendDecl::Create(Context, CurContext, TSI->getTypeLoc().getBeginLoc(),
17729 CurContext->addDecl(D);
17806 cast<CXXRecordDecl>(CurContext)->isLocalClass())) {
17848 DC = CurContext;
17892 if (DC->Equals(CurContext))
17904 DC = CurContext;
17952 assert(ND->getLexicalDeclContext() == CurContext);
17964 if (!CurContext->isDependentContext()) {
17971 FriendDecl *FrD = FriendDecl::Create(Context, CurContext,
17975 CurContext->addDecl(FrD);
18040 << cast<CXXRecordDecl>(CurContext);
18572 CurContext->isDependentContext() || isUnevaluatedContext())