|
reference, declaration → definition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
|
References
tools/clang/include/clang/Sema/Sema.h 788 : S(S), SavedContext(S.CurContext),
793 S.CurContext = ContextToPush;
800 S.CurContext = SavedContext;
845 Ctx.Entity = cast<Decl>(S.CurContext);
854 if (auto *FD = dyn_cast<FunctionDecl>(S.CurContext))
3443 if (cast<Decl>(CurContext)
10936 return IdentifyCUDATarget(dyn_cast<FunctionDecl>(CurContext));
11516 return OriginalLexicalContext ? OriginalLexicalContext : CurContext;
tools/clang/include/clang/Sema/SemaInternal.h 103 Namespaces(SemaRef.Context, SemaRef.CurContext, SS),
tools/clang/lib/Parse/ParseCXXInlineMethods.cpp 115 ((Actions.CurContext->isDependentContext() ||
tools/clang/lib/Parse/ParseDecl.cpp 6332 Actions.CurContext->isRecord());
6353 Actions, dyn_cast<CXXRecordDecl>(Actions.CurContext), Q,
tools/clang/lib/Parse/ParseExpr.cpp 2428 DeclContext *CodeDC = Actions.CurContext;
tools/clang/lib/Parse/Parser.cpp 1217 Actions.CurContext->isTranslationUnit()) {
tools/clang/lib/Sema/Sema.cpp 409 FunctionDecl *fn = dyn_cast<FunctionDecl>(CurContext);
1252 DeclContext *DC = CurContext;
1806 !CurBSI->TheDecl->Encloses(CurContext)) {
1830 if (LSI->Lambda && !LSI->Lambda->Encloses(CurContext)) {
1857 !CurLSI->Lambda->Encloses(CurContext)) {
tools/clang/lib/Sema/SemaAccess.cpp 1458 EffectiveContext EC(S.CurContext);
1675 ObjectClass = cast<CXXConstructorDecl>(CurContext)->getParent();
1790 EffectiveContext EC(CurContext);
1903 EffectiveContext EC(CurContext);
tools/clang/lib/Sema/SemaCUDA.cpp 618 return (getEmissionStatus(cast<FunctionDecl>(CurContext)) ==
630 dyn_cast<FunctionDecl>(CurContext), *this);
647 return (getEmissionStatus(cast<FunctionDecl>(CurContext)) ==
656 dyn_cast<FunctionDecl>(CurContext), *this);
669 FunctionDecl *Caller = dyn_cast<FunctionDecl>(CurContext);
736 FunctionDecl *CurFn = dyn_cast<FunctionDecl>(CurContext);
tools/clang/lib/Sema/SemaCXXScopeSpec.cpp 58 return ::getCurrentInstantiationOf(T, CurContext);
187 return ::getCurrentInstantiationOf(T, CurContext);
798 DeclContext *DC = LookupCtx ? LookupCtx : CurContext;
1025 if (isa<ObjCContainerDecl>(CurContext) || isa<ObjCMethodDecl>(CurContext))
1025 if (isa<ObjCContainerDecl>(CurContext) || isa<ObjCMethodDecl>(CurContext))
1050 return CurContext->getRedeclContext()->isFileContext();
tools/clang/lib/Sema/SemaChecking.cpp 4309 if (CurContext->isDependentContext())
5556 DeclContext *Caller = S.CurContext;
tools/clang/lib/Sema/SemaCodeComplete.cpp 371 if (isa<BlockDecl>(S.CurContext)) {
377 } else if (const auto *Function = dyn_cast<FunctionDecl>(S.CurContext)) {
381 } else if (const auto *Method = dyn_cast<ObjCMethodDecl>(S.CurContext)) {
1940 const auto *CR = llvm::dyn_cast<CXXRecordDecl>(S.CurContext);
2066 if (SemaRef.CurContext->isDependentContext()) {
2298 if (const auto *Function = dyn_cast<FunctionDecl>(SemaRef.CurContext))
2300 else if (const auto *Method = dyn_cast<ObjCMethodDecl>(SemaRef.CurContext))
3904 if (S.CurContext->isFileContext())
3906 if (S.CurContext->isRecord())
3953 DeclContext *CurContext = S.CurContext;
4105 CodeCompletionDeclConsumer Consumer(Results, CurContext);
4183 CodeCompletionDeclConsumer Consumer(Results, CurContext);
4359 CodeCompletionDeclConsumer Consumer(Results, CurContext);
4379 AddEnumerators(Results, Context, Enum, CurContext, CoveredEnumerators());
4781 /*AllowNullaryMethods=*/true, CurContext,
4788 CurContext, AddedProperties, Results,
4852 /*AllowNullaryMethods=*/true, CurContext, AddedProperties,
4891 CodeCompletionDeclConsumer Consumer(Results, CurContext);
5026 AddEnumerators(Results, Context, Enum, CurContext, Enumerators);
5280 CodeCompletionDeclConsumer Consumer(Results, CurContext);
5431 CodeCompletionDeclConsumer Consumer(Results, CurContext);
5452 CodeCompletionDeclConsumer Consumer(Results, CurContext);
5501 CurContext, nullptr, false);
5518 CodeCompletionDeclConsumer Consumer(Results, CurContext);
5546 CodeCompletionDeclConsumer Consumer(Results, CurContext);
5747 CurContext, nullptr, false);
5863 if (isa<ObjCImplDecl>(CurContext))
5865 else if (CurContext->isObjCContainer())
6280 ObjCInterfaceDecl *Class = dyn_cast_or_null<ObjCInterfaceDecl>(CurContext);
6283 dyn_cast_or_null<ObjCCategoryDecl>(CurContext))
6297 AddObjCMethods(Class, true, MK_ZeroArgSelector, None, CurContext, Selectors,
6306 ObjCInterfaceDecl *Class = dyn_cast_or_null<ObjCInterfaceDecl>(CurContext);
6309 dyn_cast_or_null<ObjCCategoryDecl>(CurContext))
6323 AddObjCMethods(Class, true, MK_OneArgSelector, None, CurContext, Selectors,
6396 CodeCompletionDeclConsumer Consumer(Results, CurContext);
6606 CodeCompletionDeclConsumer Consumer(Results, CurContext);
6764 AddObjCMethods(CDecl, false, MK_Any, SelIdents, SemaRef.CurContext,
6795 Results.MaybeAddResult(R, SemaRef.CurContext);
6913 AddObjCMethods(ClassDecl, false, MK_Any, SelIdents, CurContext,
6922 AddObjCMethods(I, true, MK_Any, SelIdents, CurContext, Selectors,
6930 CurContext, Selectors, AtArgumentExpression, Results);
6934 AddObjCMethods(I, true, MK_Any, SelIdents, CurContext, Selectors,
6970 Results.MaybeAddResult(R, CurContext);
7103 AddProtocolResults(Context.getTranslationUnitDecl(), CurContext, false,
7122 AddProtocolResults(Context.getTranslationUnitDecl(), CurContext, true,
7159 AddInterfaceResults(Context.getTranslationUnitDecl(), CurContext, false,
7184 AddInterfaceResults(Context.getTranslationUnitDecl(), CurContext, false,
7202 AddInterfaceResults(Context.getTranslationUnitDecl(), CurContext, false,
7240 CurContext, nullptr, false);
7276 CurContext, nullptr, false);
7295 dyn_cast_or_null<ObjCContainerDecl>(CurContext);
7312 /*AllowNullaryMethods=*/false, CurContext,
7317 false, /*AllowNullaryMethods=*/false, CurContext,
7334 dyn_cast_or_null<ObjCContainerDecl>(CurContext);
7374 CurContext, nullptr, false);
8159 if (CurContext->isObjCContainer()) {
8160 ObjCContainerDecl *OCD = dyn_cast<ObjCContainerDecl>(CurContext);
8385 Results.MaybeAddResult(R, CurContext);
tools/clang/lib/Sema/SemaCoroutine.cpp 194 auto *FD = dyn_cast<FunctionDecl>(S.CurContext);
196 S.Diag(Loc, isa<ObjCMethodDecl>(S.CurContext)
481 assert(isa<FunctionDecl>(CurContext) && "not in a function scope");
482 auto *FD = cast<FunctionDecl>(CurContext);
578 assert(isa<FunctionDecl>(S.CurContext) && "not in a function scope");
613 auto *Fn = cast<FunctionDecl>(CurContext);
1516 VarDecl *Decl = VarDecl::Create(S.Context, S.CurContext, Loc, Loc, II, Type,
1525 assert(isa<FunctionDecl>(CurContext) && "not in a function scope");
1526 auto *FD = cast<FunctionDecl>(CurContext);
tools/clang/lib/Sema/SemaDecl.cpp 240 for (DeclContext *DC = S.CurContext;
569 NNS = synthesizeCurrentNestedNameSpecifier(Context, CurContext);
572 findRecordWithDependentBasesOfEnclosingMethod(CurContext)) {
642 if (CurContext->isRecord()) {
648 CXXRecordDecl *RD = cast<CXXRecordDecl>(CurContext);
654 return CurContext->isFunctionOrMethod() || S->isFunctionPrototypeScope();
1290 assert(getContainingDC(DC) == CurContext &&
1292 CurContext = DC;
1297 assert(CurContext && "DeclContext imbalance!");
1299 CurContext = getContainingDC(CurContext);
1299 CurContext = getContainingDC(CurContext);
1300 assert(CurContext && "Popped translation unit!");
1308 auto Result = static_cast<SkippedDefinitionContext>(CurContext);
1309 CurContext = cast<TagDecl>(D)->getDefinition();
1310 assert(CurContext && "skipping definition of undefined tag");
1313 S->setEntity(CurContext->getLookupParent());
1318 CurContext = static_cast<decltype(CurContext)>(Context);
1318 CurContext = static_cast<decltype(CurContext)>(Context);
1346 assert(Ancestor->getEntity() == CurContext && "ancestor context mismatch");
1349 CurContext = DC;
1354 assert(S->getEntity() == CurContext && "Context imbalance!");
1360 CurContext = Ancestor->getEntity();
1375 assert(CurContext == FD->getLexicalParent() &&
1377 CurContext = FD;
1378 S->setEntity(CurContext);
1393 assert(CurContext && "DeclContext imbalance!");
1394 CurContext = CurContext->getLexicalParent();
1394 CurContext = CurContext->getLexicalParent();
1395 assert(CurContext && "Popped translation unit!");
1433 CurContext->addDecl(D);
1469 if (IDC == CurContext) {
1472 } else if (IDC->Encloses(CurContext))
2118 DeclContext *SavedContext = CurContext;
2119 CurContext = Parent;
2121 CurContext = SavedContext;
2325 if (!isa<CXXRecordDecl>(CurContext))
4499 if (CurContext->isFunctionOrMethod())
4515 if (!getLangOpts().CPlusPlus && CurContext->isRecord() &&
5098 auto *ParentDecl = cast<RecordDecl>(CurContext);
5110 CurContext->addDecl(Anon);
5121 InjectAnonymousStructOrUnionMembers(*this, S, CurContext, RecordDef,
5217 CXXRecordDecl *CurClass = dyn_cast<CXXRecordDecl>(CurContext);
5434 DeclContext *Cur = CurContext;
5538 DeclContext *DC = CurContext;
5617 else if (CurContext->isFunctionOrMethod() &&
5622 CurContext->getEnclosingNamespaceContext()->isTranslationUnit();
5623 } else if (CurContext->getRedeclContext()->isTranslationUnit() &&
5895 DC = CurContext;
6660 if (DC->isRecord() && !CurContext->isRecord()) {
6687 if (SC == SC_Static && CurContext->isRecord()) {
6811 } else if (CurContext->isFunctionOrMethod()) {
6826 NewVD->setLexicalDeclContext(CurContext);
6828 NewTemplate->setLexicalDeclContext(CurContext);
8125 if (SemaRef.CurContext->getRedeclContext()->isFunctionOrMethod()) {
8281 if (!isFriend && SemaRef.CurContext->isRecord())
8610 NewFD->setLexicalDeclContext(CurContext);
8685 FunctionTemplate->setLexicalDeclContext(CurContext);
8745 } else if (!CurContext->isRecord()) {
8768 (isFriend && CurContext->isDependentContext())) &&
8788 if (CurContext->isFunctionOrMethod()) {
8802 if (!CurContext->isRecord()) {
8873 if (isa<CXXMethodDecl>(NewFD) && DC == CurContext &&
8882 !CurContext->isRecord()) {
9199 if (CurContext->isDependentContext() && CurContext->isRecord()
9199 if (CurContext->isDependentContext() && CurContext->isRecord()
9314 (!Previous.empty() && CurContext->isDependentContext()))) {
9341 } else if (isFriend && cast<CXXRecordDecl>(CurContext)->isLocalClass()) {
9510 Context, CurContext, NewFD->getLocation(),
9513 CurContext->addDecl(NewSpec);
10024 S.CurContext->isRecord() && !NewFD->getFriendObjectKind();
10499 if (!CurContext->isRecord())
13194 if (!CurContext->isRecord() &&
14359 TypedefDecl::Create(Context, CurContext, D.getBeginLoc(),
14369 if (CurContext->isFunctionOrMethod())
14795 DeclContext *SearchDC = CurContext;
14796 DeclContext *DC = CurContext;
14849 New->setLexicalDeclContext(CurContext);
15229 if (!getTagInjectionContext(CurContext)->getRedeclContext()
15557 New->setLexicalDeclContext(CurContext);
15595 CurContext->addDecl(New);
15661 assert(getContainingDC(OCD) == CurContext &&
15663 CurContext = OCD;
15690 Context, Record->getTagKind(), CurContext, Record->getBeginLoc(),
15739 assert(DC == CurContext && "Mismatch of container contexts");
16295 ObjCContainerDecl *EnclosingDecl = cast<ObjCContainerDecl>(CurContext);
16376 ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(CurContext);
16378 if (ObjCCategoryDecl *CD = dyn_cast<ObjCCategoryDecl>(CurContext)) {
16390 Ivar = ObjCIvarDecl::Create(Context, cast<ObjCContainerDecl>(CurContext),
17145 if (!isa<TagDecl>(PrevDecl) && isDeclInScope(PrevDecl, CurContext, S)) {
17588 FileScopeAsmDecl *New = FileScopeAsmDecl::Create(Context, CurContext,
17591 CurContext->addDecl(New);
17656 return (dyn_cast_or_null<ObjCContainerDecl>(CurContext));
tools/clang/lib/Sema/SemaDeclAttr.cpp 7389 DeclContext *SavedContext = CurContext;
7390 CurContext = Context.getTranslationUnitDecl();
7391 NewD->setDeclContext(CurContext);
7392 NewD->setLexicalDeclContext(CurContext);
7394 CurContext = SavedContext;
tools/clang/lib/Sema/SemaDeclCXX.cpp 718 DeclContext *const DC = CurContext;
864 CurContext->addHiddenDecl(New);
2331 return dyn_cast_or_null<CXXRecordDecl>(CurContext);
2358 CurDecl = dyn_cast_or_null<CXXRecordDecl>(CurContext);
2954 AccessSpecDecl *ASDecl = AccessSpecDecl::Create(Context, Access, CurContext,
2956 CurContext->addHiddenDecl(ASDecl);
3162 assert(isa<CXXRecordDecl>(CurContext));
3169 if (cast<CXXRecordDecl>(CurContext)->isInterface()) {
3334 Member = HandleMSProperty(S, cast<CXXRecordDecl>(CurContext), Loc, D,
3340 Member = HandleField(S, cast<CXXRecordDecl>(CurContext), Loc, D,
3346 CheckShadowInheritedFields(Loc, Name, cast<CXXRecordDecl>(CurContext));
3404 for (const auto *D : cast<CXXRecordDecl>(CurContext)->decls()) {
4342 if (CurContext->isDependentContext())
4472 if (CurContext->isDependentContext())
9156 if (!CurContext->getRedeclContext()->Equals(
9333 LookupQualifiedName(R, CurContext->getRedeclContext());
9351 CurContext->getRedeclContext()->isTranslationUnit()) {
9365 DeclContext *Parent = CurContext->getRedeclContext();
9378 NamespaceDecl *Namespc = NamespaceDecl::Create(Context, CurContext, IsInline,
9399 DeclContext *Parent = CurContext->getRedeclContext();
9406 CurContext->addDecl(Namespc);
9890 while (CommonAncestor && !CommonAncestor->Encloses(CurContext))
9893 UDir = UsingDirectiveDecl::Create(Context, CurContext, UsingLoc, NamespcLoc,
9897 if (IsUsingDirectiveInToplevelContext(CurContext) &&
10050 if (!getLangOpts().CPlusPlus11 && CurContext->isRecord()) {
10059 if (cast<CXXRecordDecl>(CurContext)->isProvablyNotDerivedFrom(OrigRec)) {
10060 if (OrigDC == CurContext) {
10072 << cast<CXXRecordDecl>(CurContext)
10110 CurContext,
10148 if (CurContext->isRecord())
10214 isVirtualDirectBase(cast<CXXRecordDecl>(CurContext),
10217 Context, CurContext, UD->getLocation(), UD, Orig, IsVirtualBase);
10219 Shadow = UsingShadowDecl::Create(Context, CurContext, UD->getLocation(), UD,
10233 CurContext->addDecl(Shadow);
10408 if (auto *RD = dyn_cast<CXXRecordDecl>(CurContext))
10423 if (!isDeclInScope(D, CurContext, S))
10429 else if (!CurContext->isFunctionOrMethod() && D->isLocalExternDecl() &&
10436 if (CurContext->isRecord())
10437 LookupQualifiedName(Previous, CurContext);
10471 D = UnresolvedUsingTypenameDecl::Create(Context, CurContext,
10477 D = UnresolvedUsingValueDecl::Create(Context, CurContext, UsingLoc,
10481 CurContext->addDecl(D);
10487 UsingDecl::Create(Context, CurContext, UsingLoc, QualifierLoc,
10490 CurContext->addDecl(UD);
10512 if (CurContext->isRecord()) {
10514 Context.getTypeDeclType(cast<CXXRecordDecl>(CurContext)));
10531 CurContext->isStdNamespace() &&
10536 dyn_cast<CXXRecordDecl>(CurContext));
10568 auto *CurClass = cast<CXXRecordDecl>(CurContext);
10657 UsingPackDecl::Create(Context, CurContext, InstantiatedFrom, Expansions);
10659 CurContext->addDecl(UPD);
10670 CXXRecordDecl *TargetClass = cast<CXXRecordDecl>(CurContext);
10708 if (!CurContext->getRedeclContext()->isRecord()) {
10779 if (!CurContext->isRecord()) {
10894 if (cast<CXXRecordDecl>(CurContext)->isProvablyNotDerivedFrom(
10896 if (CurContext == NamedContext) {
10907 << cast<CXXRecordDecl>(CurContext)
10936 if (!cast<CXXRecordDecl>(CurContext)->forallBases(Collect))
10954 << cast<CXXRecordDecl>(CurContext)
10979 if (DiagnoseClassNameShadow(CurContext, NameInfo))
11004 TypeAliasDecl *NewTD = TypeAliasDecl::Create(Context, CurContext, UsingLoc,
11038 FilterLookupForScope(Previous, CurContext, S, /*ConsiderLinkage*/false,
11087 TypeAliasTemplateDecl::Create(Context, CurContext, UsingLoc,
11107 ActOnTypedefNameDecl(S, CurContext, NewTD, Previous, Redeclaration);
11150 FilterLookupForScope(PrevR, CurContext, S, /*ConsiderLinkage*/false,
11183 NamespaceAliasDecl::Create(Context, CurContext, NamespaceLoc, AliasLoc,
11823 if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(CurContext)) {
12241 VarDecl *IterationVar = VarDecl::Create(S.Context, S.CurContext, Loc, Loc,
13511 return CXXDefaultInitExpr::Create(Context, Loc, Field, CurContext);
13552 return CXXDefaultInitExpr::Create(Context, Loc, Field, CurContext);
14220 LinkageSpecDecl *D = LinkageSpecDecl::Create(Context, CurContext, ExternLoc,
14223 CurContext->addDecl(D);
14246 Decl *ED = EmptyDecl::Create(Context, CurContext, SemiLoc);
14251 CurContext->addDecl(ED);
14326 VarDecl *ExDecl = VarDecl::Create(Context, CurContext, StartLoc, Loc, Name,
14405 if (isDeclInScope(PrevDecl, CurContext, S)) {
14430 CurContext->addDecl(ExDecl);
14510 Decl *Decl = StaticAssertDecl::Create(Context, CurContext, StaticAssertLoc,
14514 CurContext->addDecl(Decl);
14586 return FriendDecl::Create(Context, CurContext,
14678 FriendDecl *Friend = FriendDecl::Create(Context, CurContext, NameLoc,
14681 CurContext->addDecl(Friend);
14693 << SS.getScopeRep() << SS.getRange() << cast<CXXRecordDecl>(CurContext);
14702 FriendDecl *Friend = FriendDecl::Create(Context, CurContext, NameLoc,
14706 CurContext->addDecl(Friend);
14802 D = FriendTemplateDecl::Create(Context, CurContext, Loc,
14813 CurContext->addDecl(D);
14885 cast<CXXRecordDecl>(CurContext)->isLocalClass())) {
14937 DC = CurContext;
14984 if (DC->Equals(CurContext))
15023 DC = CurContext;
15071 assert(ND->getLexicalDeclContext() == CurContext);
15083 if (!CurContext->isDependentContext()) {
15090 FriendDecl *FrD = FriendDecl::Create(Context, CurContext,
15094 CurContext->addDecl(FrD);
15127 << cast<CXXRecordDecl>(CurContext);
15593 CurContext->isDependentContext() || isUnevaluatedContext())
tools/clang/lib/Sema/SemaDeclObjC.cpp 764 return ObjCTypeParamDecl::Create(Context, CurContext, variance, varianceLoc,
1037 CurContext,
1056 = ObjCInterfaceDecl::Create(Context, CurContext, AtInterfaceLoc, ClassName,
1172 ObjCCompatibleAliasDecl::Create(Context, CurContext, AtLoc, AliasName, CDecl);
1227 PDecl = ObjCProtocolDecl::Create(Context, CurContext, ProtocolName,
1247 PDecl = ObjCProtocolDecl::Create(Context, CurContext, ProtocolName,
1778 = ObjCProtocolDecl::Create(Context, CurContext, Ident,
1816 CDecl = ObjCCategoryDecl::Create(Context, CurContext, AtInterfaceLoc,
1820 CurContext->addDecl(CDecl);
1863 CDecl = ObjCCategoryDecl::Create(Context, CurContext, AtInterfaceLoc,
1867 CurContext->addDecl(CDecl);
1905 CatIDecl = ObjCCategoryDecl::Create(Context, CurContext, AtCatImplLoc,
1914 ObjCCategoryImplDecl::Create(Context, CurContext, CatName, IDecl,
1929 CurContext->addDecl(CDecl);
2030 IDecl = ObjCInterfaceDecl::Create(Context, CurContext, AtClassImplLoc,
2055 ObjCImplementationDecl::Create(Context, CurContext, IDecl, SDecl,
3112 = ObjCInterfaceDecl::Create(Context, CurContext, AtClassLoc,
3781 switch (CurContext->getDeclKind()) {
3787 if (cast<ObjCCategoryDecl>(CurContext)->IsClassExtension())
3898 auto *OCD = cast<ObjCContainerDecl>(CurContext);
4550 if (!CurContext->isObjCContainer()) {
4554 Decl *ClassDecl = cast<ObjCContainerDecl>(CurContext);
4575 Context, MethodLoc, EndLoc, Sel, resultDeclType, ReturnTInfo, CurContext,
4794 if (isa<ObjCContainerDecl>(CurContext->getRedeclContext()))
4884 VarDecl *New = VarDecl::Create(Context, CurContext, StartLoc, IdLoc, Id,
tools/clang/lib/Sema/SemaExceptionSpec.cpp 42 auto *RD = dyn_cast<CXXRecordDecl>(CurContext);
tools/clang/lib/Sema/SemaExpr.cpp 78 cast<Decl>(CurContext)->getAvailability() != AR_Unavailable)
304 auto *DRD = dyn_cast<OMPDeclareReductionDecl>(CurContext);
305 if (LangOpts.OpenMP && DRD && !CurContext->containsDecl(D) &&
317 auto *DMD = dyn_cast<OMPDeclareMapperDecl>(CurContext);
318 if (LangOpts.OpenMP && DMD && !CurContext->containsDecl(D) &&
1939 DeclContext *DC = SS.isEmpty() ? CurContext : nullptr;
1955 CXXMethodDecl *CurMethod = dyn_cast<CXXMethodDecl>(CurContext);
2129 else if (auto *MD = dyn_cast<CXXMethodDecl>(S.CurContext))
2618 if (const BlockDecl *BD = CurContext->getInnermostBlockDecl())
3099 if (BD->getDeclContext() != CurContext) {
3102 diagnoseUncapturableValueReference(*this, Loc, BD, CurContext);
4933 return CXXDefaultArgExpr::Create(Context, CallLoc, Param, CurContext);
4991 S.getScopeForContext(S.CurContext), nullptr, CCC,
5565 DeclContext *EnclosingFunctionCtx = S.CurContext->getParent()->getParent();
5574 } else if (S.CurContext->isDependentContext()) {
6080 bool isFileScope = !CurContext->isFunctionOrMethod();
10880 DeclContext *DC = CurContext;
11471 DeclContext *DC = S.CurContext, *Prev = nullptr;
14082 BlockDecl *Block = BlockDecl::Create(Context, CurContext, CaretLoc);
14096 CurContext->addDecl(Block);
14100 CurContext = Block;
14439 if (const FunctionDecl *F = dyn_cast<FunctionDecl>(CurContext)) {
14566 return BuildSourceLocExpr(Kind, BuiltinLoc, RPLoc, CurContext);
15381 if (SemaRef.CurContext->isDependentContext())
15403 bool IsRecursiveCall = CurContext == Func;
15674 if (!S.getLangOpts().CPlusPlus && !S.CurContext->isFunctionOrMethod())
16031 DeclContext *DC = CurContext;
16830 (SemaRef.CurContext != Var->getDeclContext() &&
tools/clang/lib/Sema/SemaExprCXX.cpp 1090 if (ThisTy.isNull() && isLambdaCallOperator(CurContext) &&
1109 if (!ThisTy.isNull() && isLambdaCallOperator(CurContext))
1111 CurContext, Context);
1436 const FunctionDecl *Caller = dyn_cast<FunctionDecl>(CurContext);
1515 if (auto *Caller = dyn_cast<FunctionDecl>(S.CurContext))
2557 EraseUnwantedCUDAMatches(dyn_cast<FunctionDecl>(CurContext), Matches);
6739 FunctionDecl *CurFD = dyn_cast<FunctionDecl>(CurContext);
7459 assert(S.CurContext->isDependentContext());
7461 DeclContext *DC = S.CurContext;
8028 DeclContext *DC = CurContext;
tools/clang/lib/Sema/SemaExprMember.cpp 1803 auto *CurMethod = dyn_cast<CXXMethodDecl>(CurContext);
1815 !CurContext->isDependentContext() &&
tools/clang/lib/Sema/SemaExprObjC.cpp 1501 ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(CurContext);
1762 dyn_cast_or_null<ObjCMethodDecl>(CurContext->getNonClosureAncestor());
3164 ObjCMethodDecl *method = dyn_cast<ObjCMethodDecl>(CurContext);
tools/clang/lib/Sema/SemaInit.cpp 9010 isa<CXXConstructorDecl>(S.CurContext)) {
9016 = cast<CXXConstructorDecl>(S.CurContext);
9094 isa<CXXConstructorDecl>(S.CurContext)) {
9098 CXXConstructorDecl *Constructor = cast<CXXConstructorDecl>(S.CurContext);
tools/clang/lib/Sema/SemaLambda.cpp 245 DeclContext *DC = CurContext;
319 inTemplateInstantiation() || CurContext->isDependentContext();
326 isInInlineFunction(CurContext)) {
405 Method->setLexicalDeclContext(CurContext);
416 TemplateMethod->setLexicalDeclContext(CurContext);
864 VarDecl *NewVD = VarDecl::Create(Context, CurContext, Loc,
1704 if (!CurContext->isDependentContext() && !IsImplicit &&
1825 if (!CurContext->isDependentContext()) {
1883 BlockDecl *Block = BlockDecl::Create(Context, CurContext, ConvLocation);
tools/clang/lib/Sema/SemaLookup.cpp 4065 Res = LabelDecl::Create(Context, CurContext, Loc, II, GnuLabelLoc);
4075 if (Res && Res->getDeclContext() != CurContext)
4079 Res = LabelDecl::Create(Context, CurContext, Loc, II);
4729 if (isa<CXXMethodDecl>(SemaRef.CurContext) &&
4730 cast<CXXMethodDecl>(SemaRef.CurContext)->isInstance())
4810 if (getLangOpts().MSVCCompat && CurContext->isDependentContext() &&
4811 isa<CXXMethodDecl>(CurContext))
5201 CurContext(SemaRef.CurContext), MemberFn(ME) {
tools/clang/lib/Sema/SemaModule.cpp 349 checkModuleImportContext(*this, Mod, ImportLoc, CurContext);
386 ImportDecl *Import = ImportDecl::Create(Context, CurContext, StartLoc,
388 CurContext->addDecl(Import);
407 checkModuleImportContext(*this, Mod, DirectiveLoc, CurContext, true);
441 checkModuleImportContext(*this, Mod, DirectiveLoc, CurContext, true);
454 for (auto *DC = CurContext; DC; DC = DC->getLexicalParent()) {
495 for (auto *DC = CurContext; DC; DC = DC->getLexicalParent()) {
527 ExportDecl *D = ExportDecl::Create(Context, CurContext, ExportLoc);
549 for (const DeclContext *DC = CurContext; DC; DC = DC->getLexicalParent()) {
579 CurContext->addDecl(D);
tools/clang/lib/Sema/SemaObjCProperty.cpp 197 ObjCContainerDecl *ClassDecl = cast<ObjCContainerDecl>(CurContext);
426 ObjCCategoryDecl *CDecl = cast<ObjCCategoryDecl>(CurContext);
428 DeclContext *DC = CurContext;
1053 dyn_cast<ObjCContainerDecl>(CurContext);
1395 ObjCPropertyImplDecl::Create(Context, CurContext, AtLoc, PropertyLoc,
tools/clang/lib/Sema/SemaOpenMP.cpp 1103 DeclContext *DC = SemaRef.CurContext;
2195 if (!CurContext->isDependentContext())
2386 CurContext->addDecl(D);
2668 if (!CurContext->isFileContext()) {
2673 CurContext->addDecl(D);
3524 auto *CED = OMPCapturedExprDecl::Create(C, S.CurContext, Id, Ty,
3528 S.CurContext->addHiddenDecl(CED);
3597 if (!CurContext->isDependentContext() &&
3617 if (!VDC->Encloses(CurContext))
4133 assert(!S.CurContext->isDependentContext() &&
4249 if (AStmt && !CurContext->isDependentContext()) {
4696 if (!CurContext->isDependentContext() &&
5716 if (dependent() || SemaRef.CurContext->isDependentContext())
5810 if (dependent() || SemaRef.CurContext->isDependentContext())
5841 if (dependent() || SemaRef.CurContext->isDependentContext())
5919 if (dependent() || SemaRef.CurContext->isDependentContext())
5929 if (SemaRef.CurContext->isDependentContext())
6634 if (ISC.dependent() || SemaRef.CurContext->isDependentContext() || HasErrors)
6992 if (SemaRef.CurContext->isDependentContext())
7661 assert((CurContext->isDependentContext() || B.builtAll()) &&
7664 if (!CurContext->isDependentContext()) {
7700 assert((CurContext->isDependentContext() || B.builtAll()) &&
7703 if (!CurContext->isDependentContext()) {
7736 assert((CurContext->isDependentContext() || B.builtAll()) &&
7739 if (!CurContext->isDependentContext()) {
7938 assert((CurContext->isDependentContext() || B.builtAll()) &&
7941 if (!CurContext->isDependentContext()) {
7982 if (!CurContext->isDependentContext()) {
8320 if (SemaRef.CurContext->isDependentContext())
8393 if (SemaRef.CurContext->isDependentContext())
8541 if (CurContext->isDependentContext())
8603 if (CurContext->isDependentContext())
8621 if (!CurContext->isDependentContext()) {
8676 if (CurContext->isDependentContext())
8712 if (IsUpdateExprFound && !CurContext->isDependentContext()) {
8742 if (IsUpdateExprFound && !CurContext->isDependentContext()) {
8838 if (CurContext->isDependentContext())
8980 assert((CurContext->isDependentContext() || B.builtAll()) &&
8983 if (!CurContext->isDependentContext()) {
9266 assert((CurContext->isDependentContext() || B.builtAll()) &&
9302 assert((CurContext->isDependentContext() || B.builtAll()) &&
9305 if (!CurContext->isDependentContext()) {
9351 assert((CurContext->isDependentContext() || B.builtAll()) &&
9387 assert((CurContext->isDependentContext() || B.builtAll()) &&
9390 if (!CurContext->isDependentContext()) {
9455 assert((CurContext->isDependentContext() || B.builtAll()) &&
9491 assert((CurContext->isDependentContext() || B.builtAll()) &&
9534 assert((CurContext->isDependentContext() || B.builtAll()) &&
9578 assert((CurContext->isDependentContext() || B.builtAll()) &&
9581 if (!CurContext->isDependentContext()) {
9634 assert((CurContext->isDependentContext() || B.builtAll()) &&
9637 if (!CurContext->isDependentContext()) {
9690 assert((CurContext->isDependentContext() || B.builtAll()) &&
9693 if (!CurContext->isDependentContext()) {
9745 assert((CurContext->isDependentContext() || B.builtAll()) &&
9748 if (!CurContext->isDependentContext()) {
9801 assert((CurContext->isDependentContext() || B.builtAll()) &&
9849 assert((CurContext->isDependentContext() || B.builtAll()) &&
9852 if (!CurContext->isDependentContext()) {
9911 assert((CurContext->isDependentContext() || B.builtAll()) &&
9914 if (!CurContext->isDependentContext()) {
9973 assert((CurContext->isDependentContext() || B.builtAll()) &&
10051 assert((CurContext->isDependentContext() || B.builtAll()) &&
10094 assert((CurContext->isDependentContext() || B.builtAll()) &&
10097 if (!CurContext->isDependentContext()) {
10150 assert((CurContext->isDependentContext() || B.builtAll()) &&
10154 if (!CurContext->isDependentContext()) {
10208 assert((CurContext->isDependentContext() || B.builtAll()) &&
10211 if (!CurContext->isDependentContext()) {
10993 if (CaptureRegion != OMPD_unknown && !CurContext->isDependentContext()) {
11024 if (CaptureRegion != OMPD_unknown && !CurContext->isDependentContext()) {
11110 !SemaRef.CurContext->isDependentContext()) {
11136 if (CaptureRegion != OMPD_unknown && !CurContext->isDependentContext()) {
11668 !CurContext->isDependentContext()) {
12132 if (!VD && !CurContext->isDependentContext())
12135 Vars.push_back((VD || CurContext->isDependentContext())
12419 CurContext->addDecl(VDPrivate);
12424 if (!VD && !CurContext->isDependentContext()) {
12434 Vars.push_back((VD || CurContext->isDependentContext())
12569 if (!VD && !CurContext->isDependentContext()) {
12593 Vars.push_back((VD || CurContext->isDependentContext())
12647 if (!VD && isOpenMPCapturedDecl(D) && !CurContext->isDependentContext())
12650 Vars.push_back((VD || !Ref || CurContext->isDependentContext())
12835 if (SemaRef.CurContext->isDependentContext() || Ty->isDependentType() ||
13174 if (S.CurContext->isDependentContext() &&
13288 if (S.CurContext->isDependentContext() &&
13635 if (!VD && !S.CurContext->isDependentContext()) {
13850 if (!VD && !CurContext->isDependentContext()) {
13877 Vars.push_back((VD || CurContext->isDependentContext())
14380 if (CurContext->isDependentContext()) {
14430 if (!CurContext->isDependentContext() &&
14469 if (!CurContext->isDependentContext() && DepKind == OMPC_DEPEND_sink &&
14504 if (CaptureRegion != OMPD_unknown && !CurContext->isDependentContext()) {
14523 if (FullCheck && !SemaRef.CurContext->isDependentContext() &&
15154 if (SemaRef.CurContext->isDependentContext() || Type->isDependentType() ||
15671 CurContext = DRD;
15731 CurContext = DRD;
15906 CurContext = DMD;
15956 if (CaptureRegion != OMPD_unknown && !CurContext->isDependentContext()) {
15983 if (CaptureRegion != OMPD_unknown && !CurContext->isDependentContext()) {
16109 !CurContext->isDependentContext()) {
16426 CurContext->addDecl(VDPrivate);
16598 if (!VD && !CurContext->isDependentContext())
16600 Vars.push_back((VD || CurContext->isDependentContext())
tools/clang/lib/Sema/SemaOverload.cpp 1022 (OldIsUsingDecl || NewIsUsingDecl) && CurContext->isRecord() &&
6232 if (const FunctionDecl *Caller = dyn_cast<FunctionDecl>(CurContext))
6752 if (const FunctionDecl *Caller = dyn_cast<FunctionDecl>(CurContext))
9500 FunctionDecl *Caller = dyn_cast<FunctionDecl>(S.CurContext);
9607 const FunctionDecl *Caller = dyn_cast<FunctionDecl>(S.CurContext);
10497 FunctionDecl *Caller = cast<FunctionDecl>(S.CurContext);
11488 if (FunctionDecl *Caller = dyn_cast<FunctionDecl>(S.CurContext))
11605 S.EraseUnwantedCUDAMatches(dyn_cast<FunctionDecl>(S.CurContext), Matches);
12100 for (DeclContext *DC = SemaRef.CurContext; DC; DC = DC->getParent()) {
12343 CurContext->isDependentContext() && !isSFINAEContext() &&
12344 (isa<FunctionDecl>(CurContext) || isa<CXXRecordDecl>(CurContext))) {
12344 (isa<FunctionDecl>(CurContext) || isa<CXXRecordDecl>(CurContext))) {
13550 if ((isa<CXXConstructorDecl>(CurContext) ||
13551 isa<CXXDestructorDecl>(CurContext)) &&
13559 << MD->getDeclName() << isa<CXXDestructorDecl>(CurContext)
tools/clang/lib/Sema/SemaPseudoObject.cpp 567 cast<ObjCMethodDecl>(S.CurContext->getNonClosureAncestor());
tools/clang/lib/Sema/SemaStmt.cpp 2018 SemaRef.CurContext->addHiddenDecl(Decl);
2059 DeclContext *DC = SemaRef.CurContext;
3290 if (!CurContext->isDependentContext())
3637 FunctionDecl *FD = cast<FunctionDecl>(CurContext);
4171 DeclContext *DC = CurContext;
4254 DeclContext *DC = CurContext;
4271 CD = CapturedDecl::Create(Context, CurContext, NumParams);
4341 CurContext = CD;
4400 CurContext = CD;
tools/clang/lib/Sema/SemaStmtAsm.cpp 128 FunctionDecl *Func = dyn_cast<FunctionDecl>(S.CurContext);
tools/clang/lib/Sema/SemaTemplate.cpp 1412 SemanticContext = CurContext;
1467 DeclContext *OutermostContext = CurContext;
1521 if (!(TUK == TUK_Friend && CurContext->isDependentContext()) &&
1581 if (!(TUK == TUK_Friend && CurContext->isDependentContext()) &&
1611 = !(TUK == TUK_Friend && CurContext->isDependentContext());
1661 NewClass->setLexicalDeclContext(CurContext);
1662 NewTemplate->setLexicalDeclContext(CurContext);
1690 if (!CurContext->isDependentContext()) {
1699 Context, CurContext, NewClass->getLocation(), NewTemplate, FriendLoc);
1701 CurContext->addDecl(Friend);
3315 for (DeclContext *Ctx = CurContext; Ctx; Ctx = Ctx->getLookupParent()) {
3905 << /*is definition*/(SC != SC_Extern && !CurContext->isRecord())
4001 Specialization->setLexicalDeclContext(CurContext);
4006 CurContext->addDecl(Specialization);
5088 Params = SubstTemplateParams(Params, CurContext,
7489 if (S.CurContext->getRedeclContext()->isFunctionOrMethod()) {
7500 DeclContext *DC = S.CurContext->getRedeclContext();
7918 if (CurContext->isDependentContext()) {
8014 Specialization->setLexicalDeclContext(CurContext);
8021 FriendDecl *Friend = FriendDecl::Create(Context, CurContext,
8026 CurContext->addDecl(Friend);
8031 CurContext->addDecl(Specialization);
8052 DeclContext *DC = CurContext;
8832 DeclContext *CurContext = S.CurContext->getRedeclContext();
9146 Specialization->setLexicalDeclContext(CurContext);
9147 CurContext->addDecl(Specialization);
10338 DeclContext *DC = CurContext;
10341 if (CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(CurContext)) {
tools/clang/lib/Sema/SemaTemplateDeduction.cpp 2579 if (Inst.isInvalid() || !S.SubstDecl(TTP, S.CurContext, Args))
3951 DeclContext *CallingCtx = CurContext;
tools/clang/lib/Sema/SemaTemplateInstantiate.cpp 1081 Decl *Inst = getSema().SubstDecl(D, getSema().CurContext, TemplateArgs);
1902 NewParm->setDeclContext(CurContext);
tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp 2752 if (auto *RD = dyn_cast<CXXRecordDecl>(SemaRef.CurContext))
5018 cast<CXXRecordDecl>(CurContext->getParent()));
5379 Decl *Inst = SubstDecl(D, CurContext, TemplateArgs);
5388 Decl *Inst = SubstDecl(D, CurContext, TemplateArgs);
5410 DeclContext *DC = CurContext;
tools/clang/lib/Sema/SemaType.cpp 3013 switch (cast<TagDecl>(SemaRef.CurContext)->getTagKind()) {
3247 !S.CurContext->isFunctionOrMethod() ||
3765 for (DeclContext *ctx = S.CurContext; ctx; ctx = ctx->getParent()) {
tools/clang/lib/Sema/TreeTransform.h 2045 getSema().CurContext->addDecl(Var);
2752 getSema().CurContext);
2763 getSema().CurContext);
7182 auto *FD = cast<FunctionDecl>(SemaRef.CurContext);
10321 getSema().CurContext != E->getParentContext();
10328 getSema().CurContext);
10575 E->getUsedContext() == SemaRef.CurContext)
10590 E->getUsedContext() == SemaRef.CurContext)
tools/clang/tools/extra/clangd/CodeComplete.cpp 573 std::string EnclosingScope = printNamespaceScope(*CCSema.CurContext);