| /openbsd-src/gnu/llvm/clang/lib/Sema/ |
| H A D | SemaCodeComplete.cpp | 318 bool CheckHiddenResult(Result &R, DeclContext *CurContext, 328 void MaybeAddResult(Result R, DeclContext *CurContext = nullptr); 341 void AddResult(Result R, DeclContext *CurContext, NamedDecl *Hiding, 391 if (isa<BlockDecl>(S.CurContext)) { in enterReturn() 397 } else if (const auto *Function = dyn_cast<FunctionDecl>(S.CurContext)) { in enterReturn() 401 } else if (const auto *Method = dyn_cast<ObjCMethodDecl>(S.CurContext)) { in enterReturn() 712 getRequiredQualification(ASTContext &Context, const DeclContext *CurContext, in getRequiredQualification() argument 717 CommonAncestor && !CommonAncestor->Encloses(CurContext); in getRequiredQualification() 813 bool ResultBuilder::CheckHiddenResult(Result &R, DeclContext *CurContext, in CheckHiddenResult() argument 836 R.Qualifier = getRequiredQualification(SemaRef.Context, CurContext, in CheckHiddenResult() [all …]
|
| H A D | SemaModule.cpp | 407 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 D | SemaCXXScopeSpec.cpp | 28 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 D | SemaDeclCXX.cpp | 756 DeclContext *const DC = CurContext; in ActOnDecompositionDeclarator() 930 CurContext->addHiddenDecl(New); in ActOnDecompositionDeclarator() 2457 return dyn_cast_or_null<CXXRecordDecl>(CurContext); in getCurrentClass() 2484 CurDecl = dyn_cast_or_null<CXXRecordDecl>(CurContext); in isCurrentClassNameTypo() 3097 AccessSpecDecl *ASDecl = AccessSpecDecl::Create(Context, Access, CurContext, in ActOnAccessSpecifier() 3099 CurContext->addHiddenDecl(ASDecl); in ActOnAccessSpecifier() 3315 assert(isa<CXXRecordDecl>(CurContext)); in ActOnCXXMemberDeclarator() 3322 if (cast<CXXRecordDecl>(CurContext)->isInterface()) { in ActOnCXXMemberDeclarator() 3496 Member = HandleMSProperty(S, cast<CXXRecordDecl>(CurContext), Loc, D, in ActOnCXXMemberDeclarator() 3502 Member = HandleField(S, cast<CXXRecordDecl>(CurContext), Loc, D, in ActOnCXXMemberDeclarator() [all …]
|
| H A D | SemaCoroutine.cpp | 191 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 D | SemaOpenMP.cpp | 1531 DeclContext *DC = SemaRef.CurContext; in buildVarDecl() 2324 DeclContext *CurContext, 2469 CurContext->getParent(), /*AsExpression=*/false); in isOpenMPCapturedDecl() 2966 if (!CurContext->isDependentContext()) in EndOpenMPDSABlock() 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() 4629 DeclContext *CurContext, in buildCaptureDecl() argument [all …]
|
| H A D | SemaDecl.cpp | 248 for (DeclContext *DC = S.CurContext; in recoverFromTypeInKnownDependentBase() 632 NNS = synthesizeCurrentNestedNameSpecifier(Context, CurContext); in ActOnMSVCUnknownTypeName() 635 findRecordWithDependentBasesOfEnclosingMethod(CurContext)) { in ActOnMSVCUnknownTypeName() 705 if (CurContext->isRecord()) { in isMicrosoftMissingTypename() 711 CXXRecordDecl *RD = cast<CXXRecordDecl>(CurContext); in isMicrosoftMissingTypename() 717 return CurContext->isFunctionOrMethod() || S->isFunctionPrototypeScope(); in isMicrosoftMissingTypename() 1345 assert(DC->getLexicalParent() == CurContext && in PushDeclContext() 1347 CurContext = DC; in PushDeclContext() 1352 assert(CurContext && "DeclContext imbalance!"); in PopDeclContext() 1354 CurContext = CurContext->getLexicalParent(); in PopDeclContext() [all …]
|
| H A D | SemaDeclObjC.cpp | 765 return ObjCTypeParamDecl::Create(Context, CurContext, variance, varianceLoc, in actOnObjCTypeParam() 1036 CurContext, in ActOnStartClassInterface() 1055 = ObjCInterfaceDecl::Create(Context, CurContext, AtInterfaceLoc, ClassName, in ActOnStartClassInterface() 1185 ObjCCompatibleAliasDecl::Create(Context, CurContext, AtLoc, AliasName, CDecl); in ActOnCompatibilityAlias() 1236 PDecl = ObjCProtocolDecl::Create(Context, CurContext, ProtocolName, in ActOnStartProtocolInterface() 1266 PDecl = ObjCProtocolDecl::Create(Context, CurContext, ProtocolName, in ActOnStartProtocolInterface() 1799 = ObjCProtocolDecl::Create(Context, CurContext, Ident, in ActOnForwardProtocolDeclaration() 1837 CDecl = ObjCCategoryDecl::Create(Context, CurContext, AtInterfaceLoc, in ActOnStartCategoryInterface() 1841 CurContext->addDecl(CDecl); in ActOnStartCategoryInterface() 1885 CDecl = ObjCCategoryDecl::Create(Context, CurContext, AtInterfaceLoc, in ActOnStartCategoryInterface() [all …]
|
| H A D | SemaLambda.cpp | 247 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 D | SemaStmt.cpp | 615 if (CurContext->isDependentContext() || (E && E->isInstantiationDependent())) in checkAndRewriteMustTailAttr() 637 assert(!CurContext->isDependentContext() && in checkMustTailAttr() 698 const auto *CallerDecl = dyn_cast<FunctionDecl>(CurContext); in checkMustTailAttr() 703 if (isa<BlockDecl>(CurContext)) in checkMustTailAttr() 705 else if (isa<ObjCMethodDecl>(CurContext)) in checkMustTailAttr() 712 } else if (const auto *CMD = dyn_cast<CXXMethodDecl>(CurContext)) { in checkMustTailAttr() 936 if (CurContext->isFunctionOrMethod()) { in ActOnIfStmt() 938 dyn_cast<FunctionDecl>(Decl::castFromDeclContext(CurContext)); in ActOnIfStmt() 2407 SemaRef.CurContext->addHiddenDecl(Decl); in FinishForRangeVarDecl() 2448 DeclContext *DC = SemaRef.CurContext; in BuildForRangeVarDecl() [all …]
|
| H A D | SemaTemplate.cpp | 1873 SemanticContext = CurContext; in CheckClassTemplate() 1928 DeclContext *OutermostContext = CurContext; in CheckClassTemplate() 1982 if (!(TUK == TUK_Friend && CurContext->isDependentContext()) && in CheckClassTemplate() 2042 if (!(TUK == TUK_Friend && CurContext->isDependentContext()) && in CheckClassTemplate() 2072 = !(TUK == TUK_Friend && CurContext->isDependentContext()); in CheckClassTemplate() 2122 NewClass->setLexicalDeclContext(CurContext); in CheckClassTemplate() 2123 NewTemplate->setLexicalDeclContext(CurContext); in CheckClassTemplate() 2151 if (!CurContext->isDependentContext()) { in CheckClassTemplate() 2160 Context, CurContext, NewClass->getLocation(), NewTemplate, FriendLoc); in CheckClassTemplate() 2162 CurContext->addDecl(Friend); in CheckClassTemplate() [all …]
|
| H A D | Sema.cpp | 193 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 D | SemaLookup.cpp | 4421 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() 4847 ASTContext &Context, DeclContext *CurContext, CXXScopeSpec *CurScopeSpec) in NamespaceSpecifierSet() argument 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() [all …]
|
| H A D | SemaAttr.cpp | 556 !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 D | SemaAccess.cpp | 1473 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 D | SemaObjCProperty.cpp | 193 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 D | SemaExpr.cpp | 91 cast<Decl>(CurContext)->getAvailability() != AR_Unavailable) in CanUseDecl() 343 auto *DRD = dyn_cast<OMPDeclareReductionDecl>(CurContext); in DiagnoseUseOfDecl() 344 if (LangOpts.OpenMP && DRD && !CurContext->containsDecl(D) && in DiagnoseUseOfDecl() 2040 auto *MD = dyn_cast_or_null<CXXMethodDecl>(S.CurContext); in isCapturingReferenceToHostVarInCUDADeviceLambda() 2217 CXXMethodDecl *CurMethod = dyn_cast<CXXMethodDecl>(CurContext); in DiagnoseDependentMemberLookup() 2290 DeclContext *DC = SS.isEmpty() ? CurContext : nullptr; in DiagnoseEmptyLookup() 2454 else if (auto *MD = dyn_cast<CXXMethodDecl>(S.CurContext)) in recoverFromMSUnqualifiedLookup() 2954 if (const BlockDecl *BD = CurContext->getInnermostBlockDecl()) in BuildIvarRefExpr() 5400 auto *VD = VarDecl::Create(Context, CurContext, StartLoc, D.DeclIdentLoc, in ActOnOMPIteratorExpr() 5411 FilterLookupForScope(Previous, CurContext, S, /*ConsiderLinkage=*/false, in ActOnOMPIteratorExpr() [all …]
|
| H A D | SemaExprCXX.cpp | 1200 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() 9100 RequiresExprBodyDecl *Body = RequiresExprBodyDecl::Create(Context, CurContext, in ActOnStartRequiresExpr() 9125 assert(CurContext && "DeclContext imbalance!"); in ActOnFinishRequiresExpr() [all …]
|
| H A D | SemaExprMember.cpp | 1846 auto *CurMethod = dyn_cast<CXXMethodDecl>(CurContext); in BuildFieldReferenceExpr() 1858 !CurContext->isDependentContext() && in BuildFieldReferenceExpr()
|
| H A D | SemaTemplateInstantiateDecl.cpp | 2141 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 D | SemaStmtAsm.cpp | 130 FunctionDecl *Func = dyn_cast<FunctionDecl>(S.CurContext); in CheckNakedParmReference()
|
| /openbsd-src/gnu/llvm/clang/lib/AST/ |
| H A D | CXXInheritance.cpp | 116 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-src/gnu/llvm/clang/include/clang/Sema/ |
| H A D | SemaInternal.h | 103 Namespaces(SemaRef.Context, SemaRef.CurContext, SS), in TypoCorrectionConsumer() 238 NamespaceSpecifierSet(ASTContext &Context, DeclContext *CurContext,
|
| H A D | TypoCorrection.h | 393 DeclContext *CurContext; variable
|
| /openbsd-src/gnu/llvm/clang/lib/Interpreter/ |
| H A D | IncrementalParser.cpp | 166 S.CurContext = nullptr; in ParseOrWrapTopLevelDecl()
|