Lines Matching refs:CurContext

755   DeclContext *const DC = CurContext;
917 isDeclInScope(*(Previous.end() - 1), CurContext, S, false)) {
948 CurContext->addHiddenDecl(New);
2600 return dyn_cast_or_null<CXXRecordDecl>(CurContext);
2620 CurDecl = dyn_cast_or_null<CXXRecordDecl>(CurContext);
3134 AccessSpecDecl *ASDecl = AccessSpecDecl::Create(Context, Access, CurContext,
3136 CurContext->addHiddenDecl(ASDecl);
3332 assert(isa<CXXRecordDecl>(CurContext));
3339 if (cast<CXXRecordDecl>(CurContext)->isInterface()) {
3495 Member = HandleMSProperty(S, cast<CXXRecordDecl>(CurContext), Loc, D,
3501 Member = HandleField(S, cast<CXXRecordDecl>(CurContext), Loc, D,
3507 CheckShadowInheritedFields(Loc, Name, cast<CXXRecordDecl>(CurContext));
3565 for (const auto *D : cast<CXXRecordDecl>(CurContext)->decls()) {
4610 if (CurContext->isDependentContext())
4639 bool Dependent = CurContext->isDependentContext() &&
4748 if (CurContext->isDependentContext())
8505 S.Context, S.CurContext, Loc, Loc, IterationVarName, SizeType,
8606 VarDecl::Create(S.Context, S.CurContext, Loc, Loc, Name, R,
11384 if (!CurContext->getRedeclContext()->Equals(
11550 CurContext->getRedeclContext()->isTranslationUnit() &&
11569 LookupQualifiedName(R, CurContext->getRedeclContext());
11577 CurContext->getRedeclContext()->isTranslationUnit())
11590 CurContext->getRedeclContext()->isTranslationUnit()) {
11606 DeclContext *Parent = CurContext->getRedeclContext();
11620 Context, CurContext, IsInline, StartLoc, Loc, II, PrevNS, IsNested);
11641 DeclContext *Parent = CurContext->getRedeclContext();
11648 CurContext->addDecl(Namespc);
12014 static bool IsUsingDirectiveInToplevelContext(DeclContext *CurContext) {
12015 switch (CurContext->getDeclKind()) {
12019 return IsUsingDirectiveInToplevelContext(CurContext->getParent());
12156 while (CommonAncestor && !CommonAncestor->Encloses(CurContext))
12159 UDir = UsingDirectiveDecl::Create(Context, CurContext, UsingLoc, NamespcLoc,
12163 if (IsUsingDirectiveInToplevelContext(CurContext) &&
12366 if (!getLangOpts().CPlusPlus11 && CurContext->isRecord())
12377 if (cast<CXXRecordDecl>(CurContext)->isProvablyNotDerivedFrom(OrigRec)) {
12378 if (OrigDC == CurContext) {
12389 << Using->getQualifier() << cast<CXXRecordDecl>(CurContext)
12427 CurContext,
12479 if (CurContext->isRecord())
12544 isVirtualDirectBase(cast<CXXRecordDecl>(CurContext),
12547 Context, CurContext, Using->getLocation(), Using, Orig, IsVirtualBase);
12549 Shadow = UsingShadowDecl::Create(Context, CurContext, BUD->getLocation(),
12563 CurContext->addDecl(Shadow);
12695 if (!isDeclInScope(D, CurContext, S))
12701 else if (!CurContext->isFunctionOrMethod() && D->isLocalExternDecl() &&
12725 if (auto *RD = dyn_cast<CXXRecordDecl>(CurContext))
12739 if (CurContext->isRecord())
12740 LookupQualifiedName(Previous, CurContext);
12781 D = UnresolvedUsingTypenameDecl::Create(Context, CurContext,
12787 D = UnresolvedUsingValueDecl::Create(Context, CurContext, UsingLoc,
12791 CurContext->addDecl(D);
12798 UsingDecl::Create(Context, CurContext, UsingLoc, QualifierLoc,
12801 CurContext->addDecl(UD);
12824 if (CurContext->isRecord()) {
12826 Context.getTypeDeclType(cast<CXXRecordDecl>(CurContext)));
12837 R.addDecl(UnresolvedUsingIfExistsDecl::Create(Context, CurContext, UsingLoc,
12852 CurContext->isStdNamespace() &&
12857 dyn_cast<CXXRecordDecl>(CurContext));
12889 auto *CurClass = cast<CXXRecordDecl>(CurContext);
12973 if (CurContext->getRedeclContext()->isRecord()) {
12995 UsingEnumDecl *UD = UsingEnumDecl::Create(Context, CurContext, UsingLoc,
12998 CurContext->addDecl(UD);
13028 UsingPackDecl::Create(Context, CurContext, InstantiatedFrom, Expansions);
13030 CurContext->addDecl(UPD);
13040 CXXRecordDecl *TargetClass = cast<CXXRecordDecl>(CurContext);
13075 if (!CurContext->getRedeclContext()->isRecord()) {
13173 if (!CurContext->isRecord()) {
13293 if (cast<CXXRecordDecl>(CurContext)->isProvablyNotDerivedFrom(
13302 if (CurContext == NamedContext) {
13312 << SS.getScopeRep() << cast<CXXRecordDecl>(CurContext)
13341 if (!cast<CXXRecordDecl>(CurContext)->forallBases(Collect))
13359 << cast<CXXRecordDecl>(CurContext)
13381 if (DiagnoseClassNameShadow(CurContext, NameInfo))
13406 TypeAliasDecl *NewTD = TypeAliasDecl::Create(Context, CurContext, UsingLoc,
13442 FilterLookupForScope(Previous, CurContext, S, /*ConsiderLinkage*/false,
13491 TypeAliasTemplateDecl::Create(Context, CurContext, UsingLoc,
13511 ActOnTypedefNameDecl(S, CurContext, NewTD, Previous, Redeclaration);
13554 FilterLookupForScope(PrevR, CurContext, S, /*ConsiderLinkage*/false,
13587 NamespaceAliasDecl::Create(Context, CurContext, NamespaceLoc, AliasLoc,
14246 if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(CurContext)) {
14664 VarDecl *IterationVar = VarDecl::Create(S.Context, S.CurContext, Loc, Loc,
16690 LinkageSpecDecl *D = LinkageSpecDecl::Create(Context, CurContext, ExternLoc,
16708 CurContext->addDecl(D);
16736 Decl *ED = EmptyDecl::Create(Context, CurContext, SemiLoc);
16741 CurContext->addDecl(ED);
16822 VarDecl *ExDecl = VarDecl::Create(Context, CurContext, StartLoc, Loc, Name,
16899 if (isDeclInScope(PrevDecl, CurContext, S)) {
16924 CurContext->addDecl(ExDecl);
17329 getLangOpts().CPlusPlus && CurContext->isDependentContext();
17379 Decl *Decl = StaticAssertDecl::Create(Context, CurContext, StaticAssertLoc,
17383 CurContext->addDecl(Decl);
17471 FriendDecl *Friend = FriendDecl::Create(Context, CurContext, NameLoc,
17474 CurContext->addDecl(Friend);
17486 << SS.getScopeRep() << SS.getRange() << cast<CXXRecordDecl>(CurContext);
17495 FriendDecl *Friend = FriendDecl::Create(Context, CurContext, NameLoc,
17499 CurContext->addDecl(Friend);
17592 D = FriendTemplateDecl::Create(Context, CurContext, Loc, TempParams, TSI,
17595 D = FriendDecl::Create(Context, CurContext, TSI->getTypeLoc().getBeginLoc(),
17602 CurContext->addDecl(D);
17676 cast<CXXRecordDecl>(CurContext)->isLocalClass())) {
17718 DC = CurContext;
17762 if (DC->Equals(CurContext))
17774 DC = CurContext;
17822 assert(ND->getLexicalDeclContext() == CurContext);
17834 if (!CurContext->isDependentContext()) {
17841 FriendDecl *FrD = FriendDecl::Create(Context, CurContext,
17845 CurContext->addDecl(FrD);
17910 << cast<CXXRecordDecl>(CurContext);
18442 CurContext->isDependentContext() || isUnevaluatedContext())