Home
last modified time | relevance | path

Searched refs:CurContext (Results 1 – 25 of 42) sorted by relevance

12

/openbsd/gnu/llvm/clang/lib/Sema/
H A DSemaCodeComplete.cpp391 if (isa<BlockDecl>(S.CurContext)) { in enterReturn()
1105 MaybeAddResult(Result, CurContext); in MaybeAddResult()
1281 AddResult(Result, CurContext, Hiding); in AddResult()
4178 if (S.CurContext->isFileContext()) in mapCodeCompletionContext()
4180 if (S.CurContext->isRecord()) in mapCodeCompletionContext()
4227 DeclContext *CurContext = S.CurContext; in MaybeAddOverrideCalls() local
4228 while (isa<BlockDecl>(CurContext)) in MaybeAddOverrideCalls()
4229 CurContext = CurContext->getParent(); in MaybeAddOverrideCalls()
6735 CurContext, nullptr, false); in CodeCompleteNamespaceDecl()
7144 if (isa<ObjCImplDecl>(CurContext)) in CodeCompleteObjCAtDirective()
[all …]
H A DSemaModule.cpp407 ImportDecl::Create(Context, CurContext, ModuleLoc, Mod, Path[0].second); in ActOnModuleDecl()
547 checkModuleImportContext(*this, Mod, ImportLoc, CurContext); in ActOnModuleImport()
585 ImportDecl *Import = ImportDecl::Create(Context, CurContext, StartLoc, in ActOnModuleImport()
587 CurContext->addDecl(Import); in ActOnModuleImport()
628 checkModuleImportContext(*this, Mod, DirectiveLoc, CurContext, true); in ActOnModuleInclude()
669 checkModuleImportContext(*this, Mod, DirectiveLoc, CurContext, true); in ActOnModuleBegin()
682 for (auto *DC = CurContext; DC; DC = DC->getLexicalParent()) { in ActOnModuleBegin()
723 for (auto *DC = CurContext; DC; DC = DC->getLexicalParent()) { in ActOnModuleEnd()
755 ExportDecl *D = ExportDecl::Create(Context, CurContext, ExportLoc); in ActOnStartExportDecl()
760 CurContext->addDecl(D); in ActOnStartExportDecl()
[all …]
H A DSemaCXXScopeSpec.cpp28 DeclContext *CurContext) { in getCurrentInstantiationOf() argument
36 Record->isCurrentInstantiation(CurContext)) in getCurrentInstantiationOf()
58 return ::getCurrentInstantiationOf(T, CurContext); in computeDeclContext()
187 return ::getCurrentInstantiationOf(T, CurContext); in getCurrentInstantiationOf()
816 DeclContext *DC = LookupCtx ? LookupCtx : CurContext; in BuildCXXNestedNameSpecifier()
1046 if (isa<ObjCContainerDecl>(CurContext) || isa<ObjCMethodDecl>(CurContext)) in ShouldEnterDeclaratorScope()
1071 return CurContext->getRedeclContext()->isFileContext(); in ShouldEnterDeclaratorScope()
H A DSemaDeclCXX.cpp12074 CurContext, in CheckUsingShadowDecl()
12476 CurContext->addDecl(D); in BuildUsingDeclaration()
12486 CurContext->addDecl(UD); in BuildUsingDeclaration()
12680 CurContext->addDecl(UD); in BuildUsingEnumDeclaration()
12712 CurContext->addDecl(UPD); in BuildUsingPackDecl()
16391 CurContext->addDecl(D); in ActOnStartLinkageSpecification()
16427 CurContext->addDecl(ED); in ActOnEmptyDeclaration()
17149 CurContext->addDecl(D); in ActOnFriendTypeDecl()
17273 DC = CurContext; in ActOnFriendFunctionDecl()
17356 DC = CurContext; in ActOnFriendFunctionDecl()
[all …]
H A DSemaCoroutine.cpp191 auto *FD = dyn_cast<FunctionDecl>(S.CurContext); in isValidCoroutineContext()
193 S.Diag(Loc, isa<ObjCMethodDecl>(S.CurContext) in isValidCoroutineContext()
482 assert(isa<FunctionDecl>(CurContext) && "not in a function scope"); in buildCoroutinePromise()
483 auto *FD = cast<FunctionDecl>(CurContext); in buildCoroutinePromise()
591 assert(isa<FunctionDecl>(S.CurContext) && "not in a function scope"); in checkCoroutineContext()
638 S.Diag(cast<FunctionDecl>(S.CurContext)->getLocation(), in checkNoThrow()
704 auto *Fn = cast<FunctionDecl>(CurContext); in ActOnCoroutineBodyStart()
1783 VarDecl *Decl = VarDecl::Create(S.Context, S.CurContext, Loc, Loc, II, Type, in buildVarDecl()
1792 assert(isa<FunctionDecl>(CurContext) && "not in a function scope"); in buildCoroutineParameterMoves()
1793 auto *FD = cast<FunctionDecl>(CurContext); in buildCoroutineParameterMoves()
H A DSemaOpenMP.cpp1531 DeclContext *DC = SemaRef.CurContext; in buildVarDecl()
3157 CurContext->addDecl(D); in ActOnOpenMPThreadprivateDirective()
3454 if (!CurContext->isFileContext()) { in ActOnOpenMPRequiresDirective()
3459 CurContext->addDecl(D); in ActOnOpenMPRequiresDirective()
3494 auto *Ctx = CurContext; in ActOnOpenMPAssumesDirective()
4613 DSAStack->setContext(CurContext); in ActOnOpenMPRegionStart()
4652 CurContext->addHiddenDecl(CED); in buildCaptureDecl()
18361 CurContext->addDecl(VDPrivate); in ActOnOpenMPFirstprivateClause()
22174 CurContext = DRD; in ActOnOpenMPDeclareReductionCombinerStart()
22234 CurContext = DRD; in ActOnOpenMPDeclareReductionInitializerStart()
[all …]
H A DSemaDecl.cpp1347 CurContext = DC; in PushDeclContext()
1354 CurContext = CurContext->getLexicalParent(); in PopDeclContext()
1373 CurContext = static_cast<decltype(CurContext)>(Context); in ActOnTagFinishSkippedDefinition()
1404 CurContext = DC; in EnterDeclaratorContext()
1481 CurContext = FD; in ActOnReenterFunctionContext()
1482 S->setEntity(CurContext); in ActOnReenterFunctionContext()
1498 CurContext = CurContext->getLexicalParent(); in ActOnExitFunctionContext()
1548 CurContext->addDecl(D); in PushOnScopeChains()
6645 DC = CurContext; in ActOnTypedefDeclarator()
10325 if (CurContext->isDependentContext() && CurContext->isRecord() in ActOnFunctionDeclarator()
[all …]
H A DSemaDeclObjC.cpp1036 CurContext, in ActOnStartClassInterface()
1799 = ObjCProtocolDecl::Create(Context, CurContext, Ident, in ActOnForwardProtocolDeclaration()
1841 CurContext->addDecl(CDecl); in ActOnStartCategoryInterface()
1889 CurContext->addDecl(CDecl); in ActOnStartCategoryInterface()
1951 CurContext->addDecl(CDecl); in ActOnStartCategoryImplementation()
3822 switch (CurContext->getDeclKind()) { in getObjCContainerKind()
3828 if (cast<ObjCCategoryDecl>(CurContext)->IsClassExtension()) in getObjCContainerKind()
3988 auto *OCD = cast<ObjCContainerDecl>(CurContext); in ActOnAtEnd()
4732 if (!CurContext->isObjCContainer()) { in ActOnMethodDeclaration()
4737 Decl *ClassDecl = cast<ObjCContainerDecl>(CurContext); in ActOnMethodDeclaration()
[all …]
H A DSemaLambda.cpp247 DeclContext *DC = CurContext; in createLambdaClosureType()
322 inTemplateInstantiation() || CurContext->isDependentContext(); in getCurrentMangleNumberContext()
329 isInInlineFunction(CurContext)) { in getCurrentMangleNumberContext()
409 Method->setLexicalDeclContext(CurContext); in startLambdaDefinition()
420 TemplateMethod->setLexicalDeclContext(CurContext); in startLambdaDefinition()
879 VarDecl *NewVD = VarDecl::Create(Context, CurContext, Loc, in createLambdaInitCaptureVarDecl()
1849 if (!CurContext->isDependentContext() && !IsImplicit && in BuildLambdaExpr()
1974 if (!CurContext->isDependentContext()) { in BuildLambdaExpr()
2032 BlockDecl *Block = BlockDecl::Create(Context, CurContext, ConvLocation); in BuildBlockForLambdaConversion()
H A DSemaStmt.cpp637 assert(!CurContext->isDependentContext() && in checkMustTailAttr()
703 if (isa<BlockDecl>(CurContext)) in checkMustTailAttr()
705 else if (isa<ObjCMethodDecl>(CurContext)) in checkMustTailAttr()
936 if (CurContext->isFunctionOrMethod()) { in ActOnIfStmt()
2407 SemaRef.CurContext->addHiddenDecl(Decl); in FinishForRangeVarDecl()
2448 DeclContext *DC = SemaRef.CurContext; in BuildForRangeVarDecl()
3631 if (!CurContext->isDependentContext()) in ActOnCapScopeReturnStmt()
4557 DeclContext *DC = CurContext; in ActOnSEHTryBlock()
4637 DeclContext *DC = CurContext; in CreateCapturedStmtRecordDecl()
4724 CurContext = CD; in ActOnCapturedRegionStart()
[all …]
H A DSemaTemplate.cpp1873 SemanticContext = CurContext; in CheckClassTemplate()
2162 CurContext->addDecl(Friend); in CheckClassTemplate()
4641 CurContext->addDecl(Specialization); in ActOnVarTemplateSpecialization()
8889 CurContext->addDecl(Friend); in ActOnClassTemplateSpecialization()
8894 CurContext->addDecl(Specialization); in ActOnClassTemplateSpecialization()
8915 DeclContext *DC = CurContext; in ActOnConceptDefinition()
9757 DeclContext *CurContext = S.CurContext->getRedeclContext(); in CheckExplicitInstantiationScope() local
9759 if (CurContext->isRecord()) { in CheckExplicitInstantiationScope()
9774 if (CurContext->Encloses(OrigContext)) in CheckExplicitInstantiationScope()
10069 CurContext->addDecl(Specialization); in ActOnExplicitInstantiation()
[all …]
H A DSema.cpp193 CollectStats(false), CodeCompleter(CodeCompleter), CurContext(nullptr), in Sema()
515 FunctionDecl *fn = dyn_cast<FunctionDecl>(CurContext); in makeUnavailableInSystemHeader()
1449 DeclContext *DC = CurContext; in getFunctionLevelDeclContext()
1599 auto *FD = dyn_cast<FunctionDecl>(CurContext); in hasUncompilableErrorOccurred()
2303 !CurBSI->TheDecl->Encloses(CurContext)) { in getCurBlock()
2327 if (LSI->Lambda && !LSI->Lambda->Encloses(CurContext)) { in getEnclosingLambda()
2354 !CurLSI->Lambda->Encloses(CurContext)) { in getCurLambda()
H A DSemaLookup.cpp4421 Res = LabelDecl::Create(Context, CurContext, Loc, II, GnuLabelLoc); in LookupOrCreateLabel()
4431 if (Res && Res->getDeclContext() != CurContext) in LookupOrCreateLabel()
4435 Res = LabelDecl::Create(Context, CurContext, Loc, II); in LookupOrCreateLabel()
4848 : Context(Context), CurContextChain(buildContextChain(CurContext)) { in NamespaceSpecifierSet()
5097 if (isa<CXXMethodDecl>(SemaRef.CurContext) && in AddKeywordsToConsumer()
5098 cast<CXXMethodDecl>(SemaRef.CurContext)->isInstance()) in AddKeywordsToConsumer()
5177 if (getLangOpts().MSVCCompat && CurContext->isDependentContext() && in makeTypoCorrectionConsumer()
5178 isa<CXXMethodDecl>(CurContext)) in makeTypoCorrectionConsumer()
5568 CurContext(SemaRef.CurContext), MemberFn(ME) { in FunctionCallFilterCCC()
5604 CurContext->getParentASTContext().getLangOpts().CPlusPlus) in ValidateCandidate()
[all …]
H A DSemaAttr.cpp556 !CurContext->getRedeclContext()->isFileContext()) { in ActOnPragmaFloatControl()
793 if (!CurContext->getRedeclContext()->isFileContext()) { in ActOnPragmaMSAllocText()
1150 if (!CurContext->getRedeclContext()->isFileContext()) { in ActOnPragmaMSOptimize()
1160 if (!CurContext->getRedeclContext()->isFileContext()) { in ActOnPragmaMSFunction()
H A DSemaAccess.cpp1473 EffectiveContext EC(S.CurContext); in CheckAccess()
1697 ObjectClass = cast<CXXConstructorDecl>(CurContext)->getParent(); in CheckConstructorAccess()
1831 EffectiveContext EC(CurContext); in CheckFriendAccess()
1944 EffectiveContext EC(CurContext); in IsSimplyAccessible()
H A DSemaObjCProperty.cpp193 ObjCContainerDecl *ClassDecl = cast<ObjCContainerDecl>(CurContext); in ActOnProperty()
419 ObjCCategoryDecl *CDecl = cast<ObjCCategoryDecl>(CurContext); in HandlePropertyInClassExtension()
421 DeclContext *DC = CurContext; in HandlePropertyInClassExtension()
1086 dyn_cast<ObjCContainerDecl>(CurContext); in ActOnPropertyImplDecl()
1424 ObjCPropertyImplDecl::Create(Context, CurContext, AtLoc, PropertyLoc, in ActOnPropertyImplDecl()
H A DSemaExpr.cpp5421 CurContext->addDecl(VD); in ActOnOMPIteratorExpr()
5480 if (!CurContext->isDependentContext()) { in ActOnOMPIteratorExpr()
6019 CallLoc, Param, CurContext}; in BuildCXXDefaultArgExpr()
6806 } else if (S.CurContext->isDependentContext()) { in tryImplicitlyCaptureThisIfImplicitMemberFunctionAccessWithDependentArgs()
12894 DeclContext *DC = CurContext; in CheckCompareOperands()
13708 DeclContext *DC = S.CurContext, *Prev = nullptr; in isReferenceToNonConstCapture()
16445 CurContext->addDecl(Block); in ActOnBlockStart()
16449 CurContext = Block; in ActOnBlockStart()
18212 if (SemaRef.CurContext->isDependentContext()) in isOdrUseContext()
18238 bool IsRecursiveCall = CurContext == Func; in MarkFunctionReferenced()
[all …]
H A DSemaExprCXX.cpp1200 if (ThisTy.isNull() && isLambdaCallOperator(CurContext) && in getCurrentThisType()
1215 if (!ThisTy.isNull() && isLambdaCallOperator(CurContext)) in getCurrentThisType()
1217 CurContext, Context); in getCurrentThisType()
7537 FunctionDecl *CurFD = dyn_cast<FunctionDecl>(CurContext); in ActOnStartCXXMemberReference()
8264 assert(S.CurContext->isDependentContext()); in CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures()
8266 DeclContext *DC = S.CurContext; in CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures()
8856 DeclContext *DC = CurContext; in ActOnFinishFullExpr()
8981 auto *TParam = TemplateTypeParmDecl::Create(Context, CurContext, in ActOnCompoundRequirement()
9125 assert(CurContext && "DeclContext imbalance!"); in ActOnFinishRequiresExpr()
9126 CurContext = CurContext->getLexicalParent(); in ActOnFinishRequiresExpr()
[all …]
H A DSemaExprMember.cpp1846 auto *CurMethod = dyn_cast<CXXMethodDecl>(CurContext); in BuildFieldReferenceExpr()
1858 !CurContext->isDependentContext() && in BuildFieldReferenceExpr()
H A DSemaTemplateInstantiateDecl.cpp2141 LexicalDC = SemaRef.CurContext; in VisitFunctionDecl()
3245 if (auto *RD = dyn_cast<CXXRecordDecl>(SemaRef.CurContext)) in VisitUsingDecl()
5723 cast<CXXRecordDecl>(CurContext->getParent())); in InstantiateMemInitializers()
6106 Decl *Inst = SubstDecl(D, CurContext, TemplateArgs); in FindInstantiatedDecl()
6115 Decl *Inst = SubstDecl(D, CurContext, TemplateArgs); in FindInstantiatedDecl()
6137 DeclContext *DC = CurContext; in FindInstantiatedDecl()
H A DSemaStmtAsm.cpp130 FunctionDecl *Func = dyn_cast<FunctionDecl>(S.CurContext); in CheckNakedParmReference()
/openbsd/gnu/llvm/clang/lib/AST/
H A DCXXInheritance.cpp116 CXXRecordDecl::isCurrentInstantiation(const DeclContext *CurContext) const { in isCurrentInstantiation()
119 for (; !CurContext->isFileContext(); CurContext = CurContext->getParent()) in isCurrentInstantiation()
120 if (CurContext->Equals(this)) in isCurrentInstantiation()
/openbsd/gnu/llvm/clang/include/clang/Sema/
H A DSemaInternal.h103 Namespaces(SemaRef.Context, SemaRef.CurContext, SS), in TypoCorrectionConsumer()
238 NamespaceSpecifierSet(ASTContext &Context, DeclContext *CurContext,
H A DTypoCorrection.h393 DeclContext *CurContext; variable
/openbsd/gnu/llvm/clang/lib/Interpreter/
H A DIncrementalParser.cpp166 S.CurContext = nullptr; in ParseOrWrapTopLevelDecl()

12