Home
last modified time | relevance | path

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

12

/freebsd/contrib/llvm-project/clang/lib/Sema/
H A DSemaModule.cpp496 ImportDecl *Import = ImportDecl::Create(Context, CurContext, ModuleLoc, in ActOnModuleDecl()
498 CurContext->addDecl(Import); in ActOnModuleDecl()
666 checkModuleImportContext(*this, Mod, ImportLoc, CurContext); in ActOnModuleImport()
703 ImportDecl *Import = ImportDecl::Create(Context, CurContext, StartLoc, in ActOnModuleImport()
705 CurContext->addDecl(Import); in ActOnModuleImport()
737 checkModuleImportContext(*this, Mod, DirectiveLoc, CurContext, true); in ActOnAnnotModuleInclude()
776 checkModuleImportContext(*this, Mod, DirectiveLoc, CurContext, true); in ActOnAnnotModuleBegin()
789 for (auto *DC = CurContext; DC; DC = DC->getLexicalParent()) { in ActOnAnnotModuleBegin()
830 for (auto *DC = CurContext; DC; DC = DC->getLexicalParent()) { in ActOnAnnotModuleEnd()
860 ExportDecl *D = ExportDecl::Create(Context, CurContext, ExportLoc); in ActOnStartExportDecl()
[all …]
H A DSemaCodeComplete.cpp338 bool CheckHiddenResult(Result &R, DeclContext *CurContext,
348 void MaybeAddResult(Result R, DeclContext *CurContext = nullptr);
364 void AddResult(Result R, DeclContext *CurContext, NamedDecl *Hiding,
414 if (isa<BlockDecl>(S.CurContext)) { in enterReturn()
420 } else if (const auto *Function = dyn_cast<FunctionDecl>(S.CurContext)) { in enterReturn()
424 } else if (const auto *Method = dyn_cast<ObjCMethodDecl>(S.CurContext)) { in enterReturn()
736 getRequiredQualification(ASTContext &Context, const DeclContext *CurContext, in getRequiredQualification() argument
741 CommonAncestor && !CommonAncestor->Encloses(CurContext); in getRequiredQualification()
841 bool ResultBuilder::CheckHiddenResult(Result &R, DeclContext *CurContext, in CheckHiddenResult() argument
864 R.Qualifier = getRequiredQualification(SemaRef.Context, CurContext, in CheckHiddenResult()
[all …]
H A DSemaCXXScopeSpec.cpp27 DeclContext *CurContext) { in getCurrentInstantiationOf() argument
34 if (Record->isCurrentInstantiation(CurContext)) in getCurrentInstantiationOf()
49 return ::getCurrentInstantiationOf(T, CurContext); in computeDeclContext()
176 return ::getCurrentInstantiationOf(T, CurContext); in getCurrentInstantiationOf()
721 DeclContext *DC = LookupCtx ? LookupCtx : CurContext; in BuildCXXNestedNameSpecifier()
973 if (isa<ObjCContainerDecl>(CurContext) || isa<ObjCMethodDecl>(CurContext)) in ShouldEnterDeclaratorScope()
998 return CurContext->getRedeclContext()->isFileContext(); in ShouldEnterDeclaratorScope()
H A DSemaDeclCXX.cpp759 DeclContext *const DC = CurContext; in ActOnDecompositionDeclarator()
926 isDeclInScope(*(Previous.end() - 1), CurContext, S, false)) { in ActOnDecompositionDeclarator()
957 CurContext->addHiddenDecl(New); in ActOnDecompositionDeclarator()
2687 return dyn_cast_or_null<CXXRecordDecl>(CurContext); in getCurrentClass()
2707 CurDecl = dyn_cast_or_null<CXXRecordDecl>(CurContext); in isCurrentClassNameTypo()
3226 AccessSpecDecl *ASDecl = AccessSpecDecl::Create(Context, Access, CurContext, in ActOnAccessSpecifier()
3228 CurContext->addHiddenDecl(ASDecl); in ActOnAccessSpecifier()
3445 assert(isa<CXXRecordDecl>(CurContext)); in ActOnCXXMemberDeclarator()
3452 if (cast<CXXRecordDecl>(CurContext)->isInterface()) { in ActOnCXXMemberDeclarator()
3608 Member = HandleMSProperty(S, cast<CXXRecordDecl>(CurContext), Loc, D, in ActOnCXXMemberDeclarator()
[all …]
H A DSemaCoroutine.cpp189 auto *FD = dyn_cast<FunctionDecl>(S.CurContext); in isValidCoroutineContext()
191 S.Diag(Loc, isa<ObjCMethodDecl>(S.CurContext) in isValidCoroutineContext()
467 assert(isa<FunctionDecl>(CurContext) && "not in a function scope"); in buildCoroutinePromise()
468 auto *FD = cast<FunctionDecl>(CurContext); in buildCoroutinePromise()
576 assert(isa<FunctionDecl>(S.CurContext) && "not in a function scope"); in checkCoroutineContext()
623 S.Diag(cast<FunctionDecl>(S.CurContext)->getLocation(), in checkNoThrow()
693 dyn_cast_or_null<FunctionDecl>(CurContext)); in ActOnCoroutineBodyStart()
711 auto *Fn = cast<FunctionDecl>(CurContext); in ActOnCoroutineBodyStart()
1942 VarDecl *Decl = VarDecl::Create(S.Context, S.CurContext, Loc, Loc, II, Type, in buildVarDecl()
1951 assert(isa<FunctionDecl>(CurContext) && "not in a function scope"); in buildCoroutineParameterMoves()
[all …]
H A DSemaDecl.cpp238 for (DeclContext *DC = S.CurContext; in recoverFromTypeInKnownDependentBase()
622 NNS = synthesizeCurrentNestedNameSpecifier(Context, CurContext); in ActOnMSVCUnknownTypeName()
625 findRecordWithDependentBasesOfEnclosingMethod(CurContext)) { in ActOnMSVCUnknownTypeName()
681 if (CurContext->isRecord()) { in isMicrosoftMissingTypename()
687 CXXRecordDecl *RD = cast<CXXRecordDecl>(CurContext); in isMicrosoftMissingTypename()
693 return CurContext->isFunctionOrMethod() || S->isFunctionPrototypeScope(); in isMicrosoftMissingTypename()
1324 assert(DC->getLexicalParent() == CurContext && in PushDeclContext()
1326 CurContext = DC; in PushDeclContext()
1331 assert(CurContext && "DeclContext imbalance!"); in PopDeclContext()
1333 CurContext = CurContext->getLexicalParent(); in PopDeclContext()
[all …]
H A DSemaDeclObjC.cpp763 return ObjCTypeParamDecl::Create(Context, SemaRef.CurContext, variance, in actOnObjCTypeParam()
1035 Context, SemaRef.CurContext, typeParam->getVariance(), in ActOnStartClassInterface()
1051 ObjCInterfaceDecl::Create(Context, SemaRef.CurContext, AtInterfaceLoc, in ActOnStartClassInterface()
1183 Context, SemaRef.CurContext, AtLoc, AliasName, CDecl); in ActOnCompatibilityAlias()
1233 PDecl = ObjCProtocolDecl::Create(Context, SemaRef.CurContext, ProtocolName, in ActOnStartProtocolInterface()
1263 PDecl = ObjCProtocolDecl::Create(Context, SemaRef.CurContext, ProtocolName, in ActOnStartProtocolInterface()
1799 ObjCProtocolDecl::Create(Context, SemaRef.CurContext, Ident, in ActOnForwardProtocolDeclaration()
1837 CDecl = ObjCCategoryDecl::Create(Context, SemaRef.CurContext, in ActOnStartCategoryInterface()
1841 SemaRef.CurContext->addDecl(CDecl); in ActOnStartCategoryInterface()
1885 CDecl = ObjCCategoryDecl::Create(Context, SemaRef.CurContext, AtInterfaceLoc, in ActOnStartCategoryInterface()
[all …]
H A DSemaBase.cpp12 DeclContext *SemaBase::getCurContext() const { return SemaRef.CurContext; } in getCurContext()
H A DSemaOpenMP.cpp1532 DeclContext *DC = SemaRef.CurContext; in buildVarDecl()
2328 DeclContext *CurContext,
2476 SemaRef.CurContext->getParent(), /*AsExpression=*/false); in isOpenMPCapturedDecl()
2984 if (!SemaRef.CurContext->isDependentContext()) in EndOpenMPDSABlock()
3001 assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) && in finishLinearClauses()
3004 if (SemaRef.CurContext->isDependentContext()) in finishLinearClauses()
3203 SemaRef.CurContext->addDecl(D); in ActOnOpenMPThreadprivateDirective()
3503 if (!SemaRef.CurContext->isFileContext()) { in ActOnOpenMPRequiresDirective()
3508 SemaRef.CurContext->addDecl(D); in ActOnOpenMPRequiresDirective()
3546 auto *Ctx = SemaRef.CurContext; in ActOnOpenMPAssumesDirective()
[all …]
H A DSemaStmt.cpp674 if (CurContext->isDependentContext() || (E && E->isInstantiationDependent())) in checkAndRewriteMustTailAttr()
696 assert(!CurContext->isDependentContext() && in checkMustTailAttr()
764 const auto *CallerDecl = dyn_cast<FunctionDecl>(CurContext); in checkMustTailAttr()
769 if (isa<BlockDecl>(CurContext)) in checkMustTailAttr()
771 else if (isa<ObjCMethodDecl>(CurContext)) in checkMustTailAttr()
778 } else if (const auto *CMD = dyn_cast<CXXMethodDecl>(CurContext)) { in checkMustTailAttr()
1019 if (CurContext->isFunctionOrMethod()) { in ActOnIfStmt()
1021 dyn_cast<FunctionDecl>(Decl::castFromDeclContext(CurContext)); in ActOnIfStmt()
2383 SemaRef.CurContext->addHiddenDecl(Decl); in FinishForRangeVarDecl()
2424 DeclContext *DC = SemaRef.CurContext; in BuildForRangeVarDecl()
[all …]
H A DSemaTemplate.cpp1884 SemanticContext = CurContext; in CheckClassTemplate()
1960 DeclContext *OutermostContext = CurContext; in CheckClassTemplate()
2013 if (!(TUK == TagUseKind::Friend && CurContext->isDependentContext()) && in CheckClassTemplate()
2016 : CurContext, in CheckClassTemplate()
2017 CurContext, KWLoc), in CheckClassTemplate()
2076 if (!(TUK == TagUseKind::Friend && CurContext->isDependentContext()) && in CheckClassTemplate()
2107 !(TUK == TagUseKind::Friend && CurContext->isDependentContext()); in CheckClassTemplate()
2160 NewClass->setLexicalDeclContext(CurContext); in CheckClassTemplate()
2161 NewTemplate->setLexicalDeclContext(CurContext); in CheckClassTemplate()
2190 if (!CurContext->isDependentContext()) { in CheckClassTemplate()
[all …]
H A DSemaLookup.cpp4464 Res = LabelDecl::Create(Context, CurContext, Loc, II, GnuLabelLoc); in LookupOrCreateLabel()
4475 if (Res && Res->getDeclContext() != CurContext) in LookupOrCreateLabel()
4479 Res = LabelDecl::Create(Context, CurContext, Loc, II); in LookupOrCreateLabel()
4890 ASTContext &Context, DeclContext *CurContext, CXXScopeSpec *CurScopeSpec) in NamespaceSpecifierSet() argument
4891 : Context(Context), CurContextChain(buildContextChain(CurContext)) { in NamespaceSpecifierSet()
5142 if (isa<CXXMethodDecl>(SemaRef.CurContext) && in AddKeywordsToConsumer()
5143 cast<CXXMethodDecl>(SemaRef.CurContext)->isInstance()) in AddKeywordsToConsumer()
5222 if (getLangOpts().MSVCCompat && CurContext->isDependentContext() && in makeTypoCorrectionConsumer()
5223 isa<CXXMethodDecl>(CurContext)) in makeTypoCorrectionConsumer()
5510 CurContext(SemaRef.CurContext), MemberFn(ME) { in FunctionCallFilterCCC()
[all …]
H A DSemaLambda.cpp251 DeclContext *DC = CurContext; in createLambdaClosureType()
295 inTemplateInstantiation() || CurContext->isDependentContext(); in getCurrentMangleNumberContext()
353 isInInlineFunction(CurContext)) { in getCurrentMangleNumberContext()
1134 Method->setLexicalDeclContext(CurContext); in ActOnLambdaExpressionAfterIntroducer()
2194 if (!CurContext->isDependentContext() && !IsImplicit && in BuildLambdaExpr()
2309 if (!CurContext->isDependentContext()) { in BuildLambdaExpr()
2368 BlockDecl *Block = BlockDecl::Create(Context, CurContext, ConvLocation); in BuildBlockForLambdaConversion()
H A DSema.cpp280 OpaqueParser(nullptr), CurContext(nullptr), ExternalSource(nullptr), in Sema()
637 FunctionDecl *fn = dyn_cast<FunctionDecl>(CurContext); in makeUnavailableInSystemHeader()
1627 DeclContext *DC = CurContext; in getFunctionLevelDeclContext()
1774 auto *FD = dyn_cast<FunctionDecl>(CurContext); in hasUncompilableErrorOccurred()
2518 !CurBSI->TheDecl->Encloses(CurContext)) { in getCurBlock()
2543 if (LSI && LSI->Lambda && !LSI->Lambda->Encloses(CurContext) && in getEnclosingLambdaOrBlock()
2571 !CurLSI->Lambda->Encloses(CurContext) && CurLSI->AfterParameterList) { in getCurLambda()
H A DSemaAccess.cpp1500 EffectiveContext EC(S.CurContext); in CheckAccess()
1718 ObjectClass = cast<CXXConstructorDecl>(CurContext)->getParent(); in CheckConstructorAccess()
1846 EffectiveContext EC(CurContext); in CheckFriendAccess()
1942 EffectiveContext EC(CurContext); in IsSimplyAccessible()
H A DSemaAttr.cpp668 !CurContext->getRedeclContext()->isFileContext()) { in ActOnPragmaFloatControl()
903 if (!CurContext->getRedeclContext()->isFileContext()) { in ActOnPragmaMSAllocText()
1259 if (!CurContext->getRedeclContext()->isFileContext()) { in ActOnPragmaMSOptimize()
1269 if (!CurContext->getRedeclContext()->isFileContext()) { in ActOnPragmaMSFunction()
H A DSemaExprCXX.cpp1214 if (ThisTy.isNull() && isLambdaCallWithImplicitObjectParameter(CurContext) && in getCurrentThisType()
1229 if (!ThisTy.isNull() && isLambdaCallOperator(CurContext)) in getCurrentThisType()
1231 CurContext, Context); in getCurrentThisType()
1421 } else if (Method && isLambdaCallWithExplicitObjectParameter(CurContext)) { in CheckCXXThisType()
1449 if (LSI->Lambda && !LSI->Lambda->Encloses(CurContext) && in MarkThisReferenced()
6895 FunctionDecl *CurFD = dyn_cast<FunctionDecl>(CurContext); in ActOnStartCXXMemberReference()
7583 assert(S.CurContext->isDependentContext()); in CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures()
7585 DeclContext *DC = S.CurContext; in CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures()
7749 DeclContext *DC = CurContext; in ActOnFinishFullExpr()
7874 auto *TParam = TemplateTypeParmDecl::Create(Context, CurContext, in ActOnCompoundRequirement()
[all …]
H A DSemaSYCL.cpp437 assert(SemaRef.CurContext == FD); in BuildSYCLKernelCallStmt()
H A DSemaExpr.cpp99 cast<Decl>(CurContext)->getAvailability() != AR_Unavailable) in CanUseDecl()
345 auto *DRD = dyn_cast<OMPDeclareReductionDecl>(CurContext); in DiagnoseUseOfDecl()
346 if (LangOpts.OpenMP && DRD && !CurContext->containsDecl(D) && in DiagnoseUseOfDecl()
2101 Decl *CurrentDecl = getPredefinedExprDecl(CurContext); in ExpandFunctionLocalPredefinedMacros()
2332 auto *MD = dyn_cast_or_null<CXXMethodDecl>(S.CurContext); in isCapturingReferenceToHostVarInCUDADeviceLambda()
2457 const auto *CurMethod = dyn_cast<CXXMethodDecl>(CurContext); in DiagnoseDependentMemberLookup()
2529 LookupCtx ? LookupCtx : (SS.isEmpty() ? CurContext : nullptr); in DiagnoseEmptyLookup()
2688 else if (auto *MD = dyn_cast<CXXMethodDecl>(S.CurContext)) in recoverFromMSUnqualifiedLookup()
3516 Decl *currentDecl = getPredefinedExprDecl(CurContext); in BuildPredefinedExpr()
5535 if (DC == SemaRef.CurContext) in TransformSourceLocExpr()
[all …]
H A DSemaObjCProperty.cpp194 ObjCContainerDecl *ClassDecl = cast<ObjCContainerDecl>(SemaRef.CurContext); in ActOnProperty()
411 ObjCCategoryDecl *CDecl = cast<ObjCCategoryDecl>(SemaRef.CurContext); in HandlePropertyInClassExtension()
413 DeclContext *DC = SemaRef.CurContext; in HandlePropertyInClassExtension()
1069 dyn_cast<ObjCContainerDecl>(SemaRef.CurContext); in ActOnPropertyImplDecl()
1414 Context, SemaRef.CurContext, AtLoc, PropertyLoc, property, in ActOnPropertyImplDecl()
H A DSemaExprMember.cpp1815 auto *Method = dyn_cast<CXXMethodDecl>(CurContext); in BuildFieldReferenceExpr()
1823 if (!isDefaultedSpecialMember(CurContext)) in BuildFieldReferenceExpr()
1834 !CurContext->isDependentContext() && in BuildFieldReferenceExpr()
/freebsd/contrib/llvm-project/clang/lib/AST/
H A DCXXInheritance.cpp115 CXXRecordDecl::isCurrentInstantiation(const DeclContext *CurContext) const { in isCurrentInstantiation()
118 for (; !CurContext->isFileContext(); CurContext = CurContext->getParent()) in isCurrentInstantiation()
119 if (CurContext->Equals(this)) in isCurrentInstantiation()
/freebsd/contrib/llvm-project/clang/include/clang/Sema/
H A DSemaInternal.h99 Namespaces(SemaRef.Context, SemaRef.CurContext, SS), in TypoCorrectionConsumer()
234 NamespaceSpecifierSet(ASTContext &Context, DeclContext *CurContext,
H A DSemaCUDA.h153 return IdentifyTarget(dyn_cast<FunctionDecl>(SemaRef.CurContext)); in CurrentTarget()
/freebsd/contrib/llvm-project/clang/lib/Interpreter/
H A DIncrementalParser.cpp58 S.CurContext = nullptr; in ParseOrWrapTopLevelDecl()

12