Lines Matching refs:CurContext
208 for (DeclContext *DC = S.CurContext; in recoverFromTypeInKnownDependentBase()
511 NNS = synthesizeCurrentNestedNameSpecifier(Context, CurContext); in ActOnMSVCUnknownTypeName()
514 findRecordWithDependentBasesOfEnclosingMethod(CurContext)) { in ActOnMSVCUnknownTypeName()
584 if (CurContext->isRecord()) { in isMicrosoftMissingTypename()
590 CXXRecordDecl *RD = cast<CXXRecordDecl>(CurContext); in isMicrosoftMissingTypename()
596 return CurContext->isFunctionOrMethod() || S->isFunctionPrototypeScope(); in isMicrosoftMissingTypename()
1114 assert(getContainingDC(DC) == CurContext && in PushDeclContext()
1116 CurContext = DC; in PushDeclContext()
1121 assert(CurContext && "DeclContext imbalance!"); in PopDeclContext()
1123 CurContext = getContainingDC(CurContext); in PopDeclContext()
1124 assert(CurContext && "Popped translation unit!"); in PopDeclContext()
1132 auto Result = static_cast<SkippedDefinitionContext>(CurContext); in ActOnTagStartSkippedDefinition()
1133 CurContext = cast<TagDecl>(D)->getDefinition(); in ActOnTagStartSkippedDefinition()
1134 assert(CurContext && "skipping definition of undefined tag"); in ActOnTagStartSkippedDefinition()
1137 S->setEntity(CurContext->getLookupParent()); in ActOnTagStartSkippedDefinition()
1142 CurContext = static_cast<decltype(CurContext)>(Context); in ActOnTagFinishSkippedDefinition()
1170 assert(Ancestor->getEntity() == CurContext && "ancestor context mismatch"); in EnterDeclaratorContext()
1173 CurContext = DC; in EnterDeclaratorContext()
1178 assert(S->getEntity() == CurContext && "Context imbalance!"); in ExitDeclaratorContext()
1184 CurContext = Ancestor->getEntity(); in ExitDeclaratorContext()
1199 assert(CurContext == FD->getLexicalParent() && in ActOnReenterFunctionContext()
1201 CurContext = FD; in ActOnReenterFunctionContext()
1202 S->setEntity(CurContext); in ActOnReenterFunctionContext()
1217 assert(CurContext && "DeclContext imbalance!"); in ActOnExitFunctionContext()
1218 CurContext = CurContext->getLexicalParent(); in ActOnExitFunctionContext()
1219 assert(CurContext && "Popped translation unit!"); in ActOnExitFunctionContext()
1255 CurContext->addDecl(D); in PushOnScopeChains()
1291 if (IDC == CurContext) { in PushOnScopeChains()
1294 } else if (IDC->Encloses(CurContext)) in PushOnScopeChains()
1847 DeclContext *SavedContext = CurContext; in LazilyCreateBuiltin()
1848 CurContext = Parent; in LazilyCreateBuiltin()
1850 CurContext = SavedContext; in LazilyCreateBuiltin()
2055 if (!isa<CXXRecordDecl>(CurContext)) in MergeTypedefNameDecl()
3934 if (CurContext->isFunctionOrMethod()) in ParsedFreeStandingDeclSpec()
3950 if (!getLangOpts().CPlusPlus && CurContext->isRecord() && in ParsedFreeStandingDeclSpec()
4523 auto *ParentDecl = cast<RecordDecl>(CurContext); in BuildMicrosoftCAnonymousStruct()
4539 CurContext->addDecl(Anon); in BuildMicrosoftCAnonymousStruct()
4550 InjectAnonymousStructOrUnionMembers(*this, S, CurContext, RecordDef, in BuildMicrosoftCAnonymousStruct()
4624 CXXRecordDecl *CurClass = dyn_cast<CXXRecordDecl>(CurContext); in GetNameFromUnqualifiedId()
4837 DeclContext *Cur = CurContext; in diagnoseQualifiedDeclaration()
4939 DeclContext *DC = CurContext; in HandleDeclarator()
5024 else if (CurContext->isFunctionOrMethod() && in HandleDeclarator()
5029 CurContext->getEnclosingNamespaceContext()->isTranslationUnit(); in HandleDeclarator()
5030 } else if (CurContext->getRedeclContext()->isTranslationUnit() && in HandleDeclarator()
5142 CurContext->addHiddenDecl(New); in HandleDeclarator()
5317 DC = CurContext; in ActOnTypedefDeclarator()
5988 if (DC->isRecord() && !CurContext->isRecord()) { in ActOnVariableDeclarator()
6015 if (SC == SC_Static && CurContext->isRecord()) { in ActOnVariableDeclarator()
6181 if (CurContext->isFunctionOrMethod()) { in ActOnVariableDeclarator()
6196 NewVD->setLexicalDeclContext(CurContext); in ActOnVariableDeclarator()
6198 NewTemplate->setLexicalDeclContext(CurContext); in ActOnVariableDeclarator()
7316 if (SemaRef.CurContext->getRedeclContext()->isFunctionOrMethod()) { in getFunctionStorageClass()
7464 if (!isFriend && SemaRef.CurContext->isRecord()) in CreateNewFunctionDecl()
7704 NewFD->setLexicalDeclContext(CurContext); in ActOnFunctionDeclarator()
7781 FunctionTemplate->setLexicalDeclContext(CurContext); in ActOnFunctionDeclarator()
7842 } else if (!CurContext->isRecord()) { in ActOnFunctionDeclarator()
7865 (isFriend && CurContext->isDependentContext())) && in ActOnFunctionDeclarator()
7885 if (CurContext->isFunctionOrMethod()) { in ActOnFunctionDeclarator()
7898 if (!CurContext->isRecord()) { in ActOnFunctionDeclarator()
8049 if (isa<CXXMethodDecl>(NewFD) && DC == CurContext && in ActOnFunctionDeclarator()
8058 !CurContext->isRecord()) { in ActOnFunctionDeclarator()
8315 if (CurContext->isDependentContext() && CurContext->isRecord() in ActOnFunctionDeclarator()
8431 CurContext->isDependentContext())) { in ActOnFunctionDeclarator()
8458 } else if (isFriend && cast<CXXRecordDecl>(CurContext)->isLocalClass()) { in ActOnFunctionDeclarator()
8608 Context, CurContext, SourceLocation(), in ActOnFunctionDeclarator()
8611 CurContext->addDecl(NewSpec); in ActOnFunctionDeclarator()
8871 if (!CurContext->isRecord()) in CheckFunctionDeclaration()
11002 if (!CurContext->isRecord() && in CheckParameter()
11328 D->setLexicalDeclContext(CurContext); in ActOnStartOfFunctionDef()
11802 DeclContext *PrevDC = CurContext; in ImplicitlyDefineFunction()
11803 CurContext = Context.getTranslationUnitDecl(); in ImplicitlyDefineFunction()
11808 CurContext = PrevDC; in ImplicitlyDefineFunction()
11943 TypedefDecl *NewTD = TypedefDecl::Create(Context, CurContext, in ParseTypedefDecl()
11956 if (CurContext->isFunctionOrMethod()) in ParseTypedefDecl()
12357 DeclContext *SearchDC = CurContext; in ActOnTag()
12358 DeclContext *DC = CurContext; in ActOnTag()
12738 if (!getTagInjectionContext(CurContext)->getRedeclContext() in ActOnTag()
13057 New->setLexicalDeclContext(CurContext); in ActOnTag()
13091 CurContext->addDecl(New); in ActOnTag()
13132 assert(getContainingDC(OCD) == CurContext && in ActOnObjCContainerStartDefinition()
13134 CurContext = OCD; in ActOnObjCContainerStartDefinition()
13160 = CXXRecordDecl::Create(Context, Record->getTagKind(), CurContext, in ActOnStartCXXMemberDeclarations()
13209 assert(DC == CurContext && "Mismatch of container contexts"); in ActOnObjCTemporaryExitContainerContext()
13746 ObjCContainerDecl *EnclosingDecl = cast<ObjCContainerDecl>(CurContext); in ActOnIvar()
13827 ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(CurContext); in ActOnLastBitfield()
13829 if (ObjCCategoryDecl *CD = dyn_cast<ObjCCategoryDecl>(CurContext)) { in ActOnLastBitfield()
13841 Ivar = ObjCIvarDecl::Create(Context, cast<ObjCContainerDecl>(CurContext), in ActOnLastBitfield()
14547 if (!isa<TagDecl>(PrevDecl) && isDeclInScope(PrevDecl, CurContext, S) && in ActOnEnumConstant()
15016 FileScopeAsmDecl *New = FileScopeAsmDecl::Create(Context, CurContext, in ActOnFileScopeAsmDecl()
15019 CurContext->addDecl(New); in ActOnFileScopeAsmDecl()
15058 return checkModuleImportContext(*this, M, ImportLoc, CurContext); in diagnoseMisplacedModuleImport()
15072 checkModuleImportContext(*this, Mod, ImportLoc, CurContext); in ActOnModuleImport()
15104 checkModuleImportContext(*this, Mod, DirectiveLoc, CurContext, true); in ActOnModuleInclude()
15139 checkModuleImportContext(*this, Mod, DirectiveLoc, CurContext); in ActOnModuleBegin()
15147 checkModuleImportContext(*this, Mod, DirectiveLoc, CurContext); in ActOnModuleEnd()
15236 return (dyn_cast_or_null<ObjCContainerDecl>(CurContext)); in getObjCDeclContext()