/freebsd/contrib/llvm-project/clang/lib/Sema/ |
H A D | SemaModule.cpp | 493 ImportDecl *Import = ImportDecl::Create(Context, CurContext, ModuleLoc, in ActOnModuleDecl() 495 CurContext->addDecl(Import); in ActOnModuleDecl() 653 checkModuleImportContext(*this, Mod, ImportLoc, CurContext); in ActOnModuleImport() 690 ImportDecl *Import = ImportDecl::Create(Context, CurContext, StartLoc, in ActOnModuleImport() 692 CurContext->addDecl(Import); in ActOnModuleImport() 723 checkModuleImportContext(*this, Mod, DirectiveLoc, CurContext, true); in ActOnAnnotModuleInclude() 762 checkModuleImportContext(*this, Mod, DirectiveLoc, CurContext, true); in ActOnAnnotModuleBegin() 775 for (auto *DC = CurContext; DC; DC = DC->getLexicalParent()) { in ActOnAnnotModuleBegin() 816 for (auto *DC = CurContext; DC; DC = DC->getLexicalParent()) { in ActOnAnnotModuleEnd() 846 ExportDecl *D = ExportDecl::Create(Context, CurContext, ExportLoc); in ActOnStartExportDecl() [all …]
|
H A D | SemaCodeComplete.cpp | 339 bool CheckHiddenResult(Result &R, DeclContext *CurContext, 349 void MaybeAddResult(Result R, DeclContext *CurContext = nullptr); 365 void AddResult(Result R, DeclContext *CurContext, NamedDecl *Hiding, 415 if (isa<BlockDecl>(S.CurContext)) { in enterReturn() 421 } else if (const auto *Function = dyn_cast<FunctionDecl>(S.CurContext)) { in enterReturn() 425 } 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 D | SemaCXXScopeSpec.cpp | 28 DeclContext *CurContext) { in getCurrentInstantiationOf() argument 36 Record->isCurrentInstantiation(CurContext)) in getCurrentInstantiationOf() 51 return ::getCurrentInstantiationOf(T, CurContext); in computeDeclContext() 181 return ::getCurrentInstantiationOf(T, CurContext); in getCurrentInstantiationOf() 727 DeclContext *DC = LookupCtx ? LookupCtx : CurContext; in BuildCXXNestedNameSpecifier() 982 if (isa<ObjCContainerDecl>(CurContext) || isa<ObjCMethodDecl>(CurContext)) in ShouldEnterDeclaratorScope() 1007 return CurContext->getRedeclContext()->isFileContext(); in ShouldEnterDeclaratorScope()
|
H A D | SemaDeclCXX.cpp | 755 DeclContext *const DC = CurContext; in ActOnDecompositionDeclarator() 917 isDeclInScope(*(Previous.end() - 1), CurContext, S, false)) { in ActOnDecompositionDeclarator() 948 CurContext->addHiddenDecl(New); in ActOnDecompositionDeclarator() 2600 return dyn_cast_or_null<CXXRecordDecl>(CurContext); in getCurrentClass() 2620 CurDecl = dyn_cast_or_null<CXXRecordDecl>(CurContext); in isCurrentClassNameTypo() 3134 AccessSpecDecl *ASDecl = AccessSpecDecl::Create(Context, Access, CurContext, in ActOnAccessSpecifier() 3136 CurContext->addHiddenDecl(ASDecl); in ActOnAccessSpecifier() 3332 assert(isa<CXXRecordDecl>(CurContext)); in ActOnCXXMemberDeclarator() 3339 if (cast<CXXRecordDecl>(CurContext)->isInterface()) { in ActOnCXXMemberDeclarator() 3495 Member = HandleMSProperty(S, cast<CXXRecordDecl>(CurContext), Lo in ActOnCXXMemberDeclarator() 12014 IsUsingDirectiveInToplevelContext(DeclContext * CurContext) IsUsingDirectiveInToplevelContext() argument [all...] |
H A D | SemaCoroutine.cpp | 192 auto *FD = dyn_cast<FunctionDecl>(S.CurContext); in isValidCoroutineContext() 194 S.Diag(Loc, isa<ObjCMethodDecl>(S.CurContext) in isValidCoroutineContext() 479 assert(isa<FunctionDecl>(CurContext) && "not in a function scope"); in buildCoroutinePromise() 480 auto *FD = cast<FunctionDecl>(CurContext); in buildCoroutinePromise() 588 assert(isa<FunctionDecl>(S.CurContext) && "not in a function scope"); in checkCoroutineContext() 635 S.Diag(cast<FunctionDecl>(S.CurContext)->getLocation(), in checkNoThrow() 704 auto *Fn = cast<FunctionDecl>(CurContext); in ActOnCoroutineBodyStart() 1857 VarDecl *Decl = VarDecl::Create(S.Context, S.CurContext, Loc, Loc, II, Type, in buildVarDecl() 1866 assert(isa<FunctionDecl>(CurContext) && "not in a function scope"); in buildCoroutineParameterMoves() 1867 auto *FD = cast<FunctionDecl>(CurContext); in buildCoroutineParameterMoves()
|
H A D | SemaDecl.cpp | 214 for (DeclContext *DC = S.CurContext; in recoverFromTypeInKnownDependentBase() 604 NNS = synthesizeCurrentNestedNameSpecifier(Context, CurContext); in ActOnMSVCUnknownTypeName() 607 findRecordWithDependentBasesOfEnclosingMethod(CurContext)) { in ActOnMSVCUnknownTypeName() 664 if (CurContext->isRecord()) { in isMicrosoftMissingTypename() 670 CXXRecordDecl *RD = cast<CXXRecordDecl>(CurContext); in isMicrosoftMissingTypename() 676 return CurContext->isFunctionOrMethod() || S->isFunctionPrototypeScope(); in isMicrosoftMissingTypename() 1307 assert(DC->getLexicalParent() == CurContext && in PushDeclContext() 1309 CurContext = DC; in PushDeclContext() 1314 assert(CurContext && "DeclContext imbalance!"); in PopDeclContext() 1316 CurContext = CurContext->getLexicalParent(); in PopDeclContext() [all …]
|
H A D | SemaDeclObjC.cpp | 763 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() 1796 ObjCProtocolDecl::Create(Context, SemaRef.CurContext, Ident, in ActOnForwardProtocolDeclaration() 1834 CDecl = ObjCCategoryDecl::Create(Context, SemaRef.CurContext, in ActOnStartCategoryInterface() 1838 SemaRef.CurContext->addDecl(CDecl); in ActOnStartCategoryInterface() 1882 CDecl = ObjCCategoryDecl::Create(Context, SemaRef.CurContext, AtInterfaceLoc, in ActOnStartCategoryInterface() [all …]
|
H A D | SemaOpenMP.cpp | 1556 DeclContext *DC = SemaRef.CurContext; in buildVarDecl() 2352 DeclContext *CurContext, 2500 SemaRef.CurContext->getParent(), /*AsExpression=*/false); in isOpenMPCapturedDecl() 3001 if (!SemaRef.CurContext->isDependentContext()) in EndOpenMPDSABlock() 3018 assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) && in finishLinearClauses() 3021 if (SemaRef.CurContext->isDependentContext()) in finishLinearClauses() 3219 SemaRef.CurContext->addDecl(D); in ActOnOpenMPThreadprivateDirective() 3517 if (!SemaRef.CurContext->isFileContext()) { in ActOnOpenMPRequiresDirective() 3522 SemaRef.CurContext->addDecl(D); in ActOnOpenMPRequiresDirective() 3558 auto *Ctx = SemaRef.CurContext; in ActOnOpenMPAssumesDirective() [all …]
|
H A D | SemaTemplate.cpp | 1862 SemanticContext = CurContext; in CheckClassTemplate() 1917 DeclContext *OutermostContext = CurContext; in CheckClassTemplate() 1970 if (!(TUK == TagUseKind::Friend && CurContext->isDependentContext()) && in CheckClassTemplate() 1973 : CurContext, in CheckClassTemplate() 1974 CurContext, KWLoc), in CheckClassTemplate() 2033 if (!(TUK == TagUseKind::Friend && CurContext->isDependentContext()) && in CheckClassTemplate() 2064 !(TUK == TagUseKind::Friend && CurContext->isDependentContext()); in CheckClassTemplate() 2115 NewClass->setLexicalDeclContext(CurContext); in CheckClassTemplate() 2116 NewTemplate->setLexicalDeclContext(CurContext); in CheckClassTemplate() 2146 if (!CurContext->isDependentContext()) { in CheckClassTemplate() [all …]
|
H A D | SemaStmt.cpp | 639 if (CurContext->isDependentContext() || (E && E->isInstantiationDependent())) in checkAndRewriteMustTailAttr() 661 assert(!CurContext->isDependentContext() && in checkMustTailAttr() 722 const auto *CallerDecl = dyn_cast<FunctionDecl>(CurContext); in checkMustTailAttr() 727 if (isa<BlockDecl>(CurContext)) in checkMustTailAttr() 729 else if (isa<ObjCMethodDecl>(CurContext)) in checkMustTailAttr() 736 } else if (const auto *CMD = dyn_cast<CXXMethodDecl>(CurContext)) { in checkMustTailAttr() 967 if (CurContext->isFunctionOrMethod()) { in ActOnIfStmt() 969 dyn_cast<FunctionDecl>(Decl::castFromDeclContext(CurContext)); in ActOnIfStmt() 2277 SemaRef.CurContext->addHiddenDecl(Decl); in FinishForRangeVarDecl() 2318 DeclContext *DC = SemaRef.CurContext; in BuildForRangeVarDecl() [all …]
|
H A D | SemaLambda.cpp | 251 DeclContext *DC = CurContext; in createLambdaClosureType() 296 inTemplateInstantiation() || CurContext->isDependentContext(); in getCurrentMangleNumberContext() 333 isInInlineFunction(CurContext)) { in getCurrentMangleNumberContext() 1108 Method->setLexicalDeclContext(CurContext); in ActOnLambdaExpressionAfterIntroducer() 2126 if (!CurContext->isDependentContext() && !IsImplicit && in BuildLambdaExpr() 2251 if (!CurContext->isDependentContext()) { in BuildLambdaExpr() 2309 BlockDecl *Block = BlockDecl::Create(Context, CurContext, ConvLocation); in BuildBlockForLambdaConversion()
|
H A D | SemaLookup.cpp | 4369 Res = LabelDecl::Create(Context, CurContext, Loc, II, GnuLabelLoc); in LookupOrCreateLabel() 4380 if (Res && Res->getDeclContext() != CurContext) in LookupOrCreateLabel() 4384 Res = LabelDecl::Create(Context, CurContext, Loc, II); in LookupOrCreateLabel() 4796 ASTContext &Context, DeclContext *CurContext, CXXScopeSpec *CurScopeSpec) in NamespaceSpecifierSet() argument 4797 : Context(Context), CurContextChain(buildContextChain(CurContext)) { in NamespaceSpecifierSet() 5050 if (isa<CXXMethodDecl>(SemaRef.CurContext) && in AddKeywordsToConsumer() 5051 cast<CXXMethodDecl>(SemaRef.CurContext)->isInstance()) in AddKeywordsToConsumer() 5130 if (getLangOpts().MSVCCompat && CurContext->isDependentContext() && in makeTypoCorrectionConsumer() 5131 isa<CXXMethodDecl>(CurContext)) in makeTypoCorrectionConsumer() 5452 CurContext(SemaRef.CurContext), MemberFn(ME) { in FunctionCallFilterCCC() [all …]
|
H A D | Sema.cpp | 222 OpaqueParser(nullptr), CurContext(nullptr), ExternalSource(nullptr), in Sema() 574 FunctionDecl *fn = dyn_cast<FunctionDecl>(CurContext); in makeUnavailableInSystemHeader() 1528 DeclContext *DC = CurContext; in getFunctionLevelDeclContext() 1673 auto *FD = dyn_cast<FunctionDecl>(CurContext); in hasUncompilableErrorOccurred() 2351 !CurBSI->TheDecl->Encloses(CurContext)) { in getCurBlock() 2375 if (LSI->Lambda && !LSI->Lambda->Encloses(CurContext) && in getEnclosingLambda() 2403 !CurLSI->Lambda->Encloses(CurContext) && CurLSI->AfterParameterList) { in getCurLambda()
|
H A D | SemaAttr.cpp | 567 !CurContext->getRedeclContext()->isFileContext()) { in ActOnPragmaFloatControl() 804 if (!CurContext->getRedeclContext()->isFileContext()) { in ActOnPragmaMSAllocText() 1144 if (!CurContext->getRedeclContext()->isFileContext()) { in ActOnPragmaMSOptimize() 1154 if (!CurContext->getRedeclContext()->isFileContext()) { in ActOnPragmaMSFunction()
|
H A D | SemaAccess.cpp | 1501 EffectiveContext EC(S.CurContext); in CheckAccess() 1722 ObjectClass = cast<CXXConstructorDecl>(CurContext)->getParent(); in CheckConstructorAccess() 1850 EffectiveContext EC(CurContext); in CheckFriendAccess() 1939 EffectiveContext EC(CurContext); in IsSimplyAccessible()
|
H A D | SemaExprCXX.cpp | 1232 if (ThisTy.isNull() && isLambdaCallWithImplicitObjectParameter(CurContext) && in getCurrentThisType() 1247 if (!ThisTy.isNull() && isLambdaCallOperator(CurContext)) in getCurrentThisType() 1249 CurContext, Context); in getCurrentThisType() 1439 } else if (Method && isLambdaCallWithExplicitObjectParameter(CurContext)) { in CheckCXXThisType() 1467 if (LSI->Lambda && !LSI->Lambda->Encloses(CurContext) && in MarkThisReferenced() 7874 FunctionDecl *CurFD = dyn_cast<FunctionDecl>(CurContext); in ActOnStartCXXMemberReference() 8561 assert(S.CurContext->isDependentContext()); in CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures() 8563 DeclContext *DC = S.CurContext; in CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures() 9140 DeclContext *DC = CurContext; in ActOnFinishFullExpr() 9265 auto *TParam = TemplateTypeParmDecl::Create(Context, CurContext, in ActOnCompoundRequirement() [all …]
|
H A D | SemaExpr.cpp | 97 cast<Decl>(CurContext)->getAvailability() != AR_Unavailable) in CanUseDecl() 337 auto *DRD = dyn_cast<OMPDeclareReductionDecl>(CurContext); in DiagnoseUseOfDecl() 338 if (LangOpts.OpenMP && DRD && !CurContext->containsDecl(D) && in DiagnoseUseOfDecl() 1992 Decl *CurrentDecl = getPredefinedExprDecl(CurContext); in ExpandFunctionLocalPredefinedMacros() 2225 auto *MD = dyn_cast_or_null<CXXMethodDecl>(S.CurContext); in isCapturingReferenceToHostVarInCUDADeviceLambda() 2383 const auto *CurMethod = dyn_cast<CXXMethodDecl>(CurContext); in DiagnoseDependentMemberLookup() 2455 LookupCtx ? LookupCtx : (SS.isEmpty() ? CurContext : nullptr); in DiagnoseEmptyLookup() 2619 else if (auto *MD = dyn_cast<CXXMethodDecl>(S.CurContext)) in recoverFromMSUnqualifiedLookup() 3468 Decl *currentDecl = getPredefinedExprDecl(CurContext); in BuildPredefinedExpr() 5434 if (DC == SemaRef.CurContext) in TransformSourceLocExpr() [all …]
|
H A D | SemaObjCProperty.cpp | 193 ObjCContainerDecl *ClassDecl = cast<ObjCContainerDecl>(SemaRef.CurContext); in ActOnProperty() 410 ObjCCategoryDecl *CDecl = cast<ObjCCategoryDecl>(SemaRef.CurContext); in HandlePropertyInClassExtension() 412 DeclContext *DC = SemaRef.CurContext; in HandlePropertyInClassExtension() 1068 dyn_cast<ObjCContainerDecl>(SemaRef.CurContext); in ActOnPropertyImplDecl() 1404 Context, SemaRef.CurContext, AtLoc, PropertyLoc, property, in ActOnPropertyImplDecl()
|
H A D | SemaObjC.cpp | 1277 IDecl->getLexicalParent() == SemaRef.CurContext && in ActOnObjCContainerStartDefinition() 1279 SemaRef.CurContext = IDecl; in ActOnObjCContainerStartDefinition() 1289 assert(ObjCCtx == SemaRef.CurContext && "Mismatch of container contexts"); in ActOnObjCTemporaryExitContainerContext()
|
H A D | SemaExprMember.cpp | 1879 auto *CurMethod = dyn_cast<CXXMethodDecl>(CurContext); in BuildFieldReferenceExpr() 1891 !CurContext->isDependentContext() && in BuildFieldReferenceExpr()
|
H A D | SemaTemplateInstantiateDecl.cpp | 2223 LexicalDC = SemaRef.CurContext; in VisitFunctionDecl() 3363 if (auto *RD = dyn_cast<CXXRecordDecl>(SemaRef.CurContext)) in VisitUsingDecl() 5807 cast<CXXRecordDecl>(CurContext->getParent())); in InstantiateMemInitializers() 6160 Decl *Inst = SubstDecl(D, CurContext, TemplateArgs); in FindInstantiatedDecl() 6169 Decl *Inst = SubstDecl(D, CurContext, TemplateArgs); in FindInstantiatedDecl() 6191 DeclContext *DC = CurContext; in FindInstantiatedDecl()
|
/freebsd/contrib/llvm-project/clang/lib/AST/ |
H A D | CXXInheritance.cpp | 117 CXXRecordDecl::isCurrentInstantiation(const DeclContext *CurContext) const { in isCurrentInstantiation() 120 for (; !CurContext->isFileContext(); CurContext = CurContext->getParent()) in isCurrentInstantiation() 121 if (CurContext->Equals(this)) in isCurrentInstantiation()
|
/freebsd/contrib/llvm-project/clang/include/clang/Sema/ |
H A D | SemaInternal.h | 99 Namespaces(SemaRef.Context, SemaRef.CurContext, SS), in TypoCorrectionConsumer() 234 NamespaceSpecifierSet(ASTContext &Context, DeclContext *CurContext,
|
H A D | SemaCUDA.h | 143 return IdentifyTarget(dyn_cast<FunctionDecl>(SemaRef.CurContext)); in CurrentTarget()
|
/freebsd/contrib/llvm-project/clang/lib/Interpreter/ |
H A D | IncrementalParser.cpp | 263 S.CurContext = nullptr; in ParseOrWrapTopLevelDecl()
|