| /llvm-project-15.0.7/clang/lib/Index/ |
| H A D | IndexDecl.cpp | 105 auto *DC = Parm->getDeclContext(); in handleDeclarator() 178 D->getDeclContext(), 0); in handleObjCMethod() 264 Ctor->getParent(), Ctor->getDeclContext(), in VisitFunctionDecl() 287 Guide->getDeclContext()); in VisitFunctionDecl() 540 auto *Container = cast<ObjCImplDecl>(D->getDeclContext()); in VisitObjCPropertyImplDecl() 586 D->getDeclContext(), SymbolRoleSet()); in VisitObjCPropertyImplDecl() 609 const DeclContext *DC = D->getDeclContext()->getRedeclContext(); in VisitUsingDecl() 627 const DeclContext *DC = D->getDeclContext()->getRedeclContext(); in VisitUsingDirectiveDecl() 644 const DeclContext *DC = D->getDeclContext()->getRedeclContext(); in VisitUnresolvedUsingValueDecl() 653 const DeclContext *DC = D->getDeclContext()->getRedeclContext(); in VisitUnresolvedUsingTypenameDecl() [all …]
|
| H A D | USRGeneration.cpp | 117 VisitDeclContext(D->getDeclContext()); in VisitUsingDecl() 213 VisitDeclContext(D->getDeclContext()); in VisitFieldDecl() 227 VisitDeclContext(D->getDeclContext()); in VisitFunctionDecl() 292 VisitDeclContext(D->getDeclContext()); in VisitNamedDecl() 311 VisitDeclContext(D->getDeclContext()); in VisitVarDecl() 368 VisitDeclContext(D->getDeclContext()); in VisitNamespaceDecl() 382 VisitDeclContext(D->getDeclContext()); in VisitNamespaceAliasDecl() 505 VisitDeclContext(D->getDeclContext()); in VisitTagDecl() 996 VisitDeclContext(D->getDeclContext()); in VisitUnresolvedUsingValueDecl() 1005 VisitDeclContext(D->getDeclContext()); in VisitUnresolvedUsingTypenameDecl() [all …]
|
| H A D | IndexingContext.cpp | 63 DC = D->getDeclContext(); in handleDecl() 166 if (const auto *Parent = dyn_cast<Decl>(D->getDeclContext())) in isTemplateImplicitInstantiation() 202 dyn_cast<ClassTemplateSpecializationDecl>(D->getDeclContext())) in getDeclContextForTemplateInstationPattern() 204 else if (const auto *RD = dyn_cast<CXXRecordDecl>(D->getDeclContext())) in getDeclContextForTemplateInstationPattern() 238 if (const auto *ED = dyn_cast<EnumDecl>(ECD->getDeclContext())) { in adjustTemplateImplicitInstantiation() 278 for (;; Parent = cast<Decl>(Parent->getDeclContext())) { in adjustParent()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/misc/ |
| H A D | ConfusableIdentifierCheck.cpp | 97 const DeclContext *DC0 = ND0->getDeclContext()->getPrimaryContext(); in mayShadowImpl() 98 const DeclContext *DC1 = ND1->getDeclContext()->getPrimaryContext(); in mayShadowImpl() 115 const DeclContext *NDParent = ND->getDeclContext(); in isMemberOf() 126 const DeclContext *DC0 = ND0->getDeclContext()->getPrimaryContext(); in mayShadow() 127 const DeclContext *DC1 = ND1->getDeclContext()->getPrimaryContext(); in mayShadow()
|
| H A D | DefinitionsInHeadersCheck.cpp | 112 const auto *DC = MD->getDeclContext(); in check() 141 if (VD->getDeclContext()->isDependentContext() && VD->isStaticDataMember()) in check()
|
| H A D | NewDeleteOverloadsCheck.cpp | 179 if (FD->getDeclContext() != Overload->getDeclContext()) in onEndOfTranslationUnit()
|
| H A D | UnusedUsingDeclsCheck.cpp | 75 if (isa<CXXRecordDecl>(Using->getDeclContext())) in check() 81 if (isa<FunctionDecl>(Using->getDeclContext())) in check()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/llvm/ |
| H A D | PreferRegisterOverUnsignedCheck.cpp | 42 const DeclContext *Context = UserVarDecl->getDeclContext(); in check() 45 if (isa<TranslationUnitDecl>(Namespace->getDeclContext()) && in check() 50 if (isa<TranslationUnitDecl>(Namespace->getDeclContext()) && in check()
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/refactor/tweaks/ |
| H A D | RemoveUsingNamespace.cpp | 55 TargetCtx(Target.getDeclContext()), Results(Results) {} in FindSameUsings() 59 D->getDeclContext() != TargetCtx) in VisitUsingDirectiveDecl() 112 if (!isa<Decl>(TargetDirective->getDeclContext())) in prepare() 155 if (!visibleContext(T->getDeclContext()) in apply()
|
| H A D | AddUsing.cpp | 74 if (D->getDeclContext()->Encloses(SelectionDeclContext)) { in VisitUsingDecl() 86 if (!Node->getDeclContext() || in TraverseDecl() 87 Node->getDeclContext()->Encloses(SelectionDeclContext)) { in TraverseDecl() 138 UsingFinder(Usings, &Inputs.ASTSelection.commonAncestor()->getDeclContext(), in findInsertionPoint() 181 &Inputs.ASTSelection.commonAncestor()->getDeclContext(); in findInsertionPoint()
|
| /llvm-project-15.0.7/clang/lib/AST/ |
| H A D | ASTImporterLookupTable.cpp | 114 DeclContext *DC = ND->getDeclContext()->getPrimaryContext(); in add() 123 DeclContext *DC = ND->getDeclContext()->getPrimaryContext(); in remove() 131 assert(OldDC != ND->getDeclContext() && in update() 133 if (contains(ND->getDeclContext(), ND)) { in update()
|
| H A D | DeclObjC.cpp | 858 const DeclContext *DC = getDeclContext(); in isDesignatedInitializerForTheInterface() 936 auto *CtxD = cast<Decl>(getDeclContext()); in getNextRedeclarationImpl() 978 auto *CtxD = cast<Decl>(getDeclContext()); in getCanonicalDecl() 1177 if (auto *ID = dyn_cast<ObjCInterfaceDecl>(getDeclContext())) in getClassInterface() 1179 if (auto *CD = dyn_cast<ObjCCategoryDecl>(getDeclContext())) in getClassInterface() 1181 if (auto *IMD = dyn_cast<ObjCImplDecl>(getDeclContext())) in getClassInterface() 1183 if (isa<ObjCProtocolDecl>(getDeclContext())) in getClassInterface() 1189 if (auto *CD = dyn_cast<ObjCCategoryDecl>(getDeclContext())) in getCategory() 1213 .substObjCMemberType(receiverType, getDeclContext(), in getSendResultType() 1330 Method = cast<ObjCContainerDecl>(Method->getDeclContext()) in getOverriddenMethods() [all …]
|
| H A D | DeclBase.cpp | 288 : getDeclContext(); in getParentFunctionOrMethod() 337 setDeclContextsImpl(getDeclContext(), DC, getASTContext()); in setLexicalDeclContext() 396 const DeclContext *DC = getDeclContext(); in isInStdNamespace() 404 DeclContext *DC = getDeclContext(); in getTranslationUnitDecl() 495 if (auto *dcd = dyn_cast<Decl>(getDeclContext())) { in getExternalSourceSymbolAttr() 981 isa<NonTypeTemplateParmDecl>(this) || !getDeclContext() || in AccessDeclContextCheck() 982 !isa<CXXRecordDecl>(getDeclContext()) || isInvalidDecl() || in AccessDeclContextCheck() 1535 auto *DC = D->getDeclContext(); in removeDecl() 1581 ND->getDeclContext()->getPrimaryContext()-> in addDecl() 1589 ND->getDeclContext()->getPrimaryContext()-> in addDeclInternal() [all …]
|
| H A D | QualTypeNames.cpp | 193 const DeclContext *DC = D->getDeclContext(); in createOuterNNS() 197 NS = dyn_cast<NamespaceDecl>(NS->getDeclContext()); in createOuterNNS() 273 const DeclContext *DC = Decl->getDeclContext()->getRedeclContext(); in createNestedNameSpecifierForScopeOf() 348 Namespace = dyn_cast<NamespaceDecl>(Namespace->getDeclContext()); in createNestedNameSpecifier()
|
| H A D | Decl.cpp | 306 const DeclContext *DC = D->getDeclContext(); in getOutermostFuncOrBlockContext() 737 for (const DeclContext *DC = D->getDeclContext(); in getLVForNamespaceScopeDecl() 1476 if (D->getDeclContext()->isRecord()) in computeLVForDecl() 1490 if (D->getDeclContext()->isFunctionOrMethod()) in computeLVForDecl() 1621 if (getDeclContext()->isFunctionOrMethod()) { in printQualifiedName() 1648 const DeclContext *Ctx = getDeclContext(); in printNestedNameSpecifier() 2124 const DeclContext *DC = D.getDeclContext(); in getDeclLanguageLinkage() 2140 const DeclContext *DC = D.getDeclContext(); in isDeclExternC() 2845 if (isa<ObjCMethodDecl>(getDeclContext())) in getSourceRange() 3197 if (isa<CXXRecordDecl>(getDeclContext())) in isReplaceableGlobalAllocationFunction() [all …]
|
| /llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | ObjCPropertyChecker.cpp | 58 dyn_cast<ObjCInterfaceDecl>(D->getDeclContext())) { in checkCopyMutable() 60 } else if (auto *CatD = dyn_cast<ObjCCategoryDecl>(D->getDeclContext())) { in checkCopyMutable()
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/unittests/ |
| H A D | ASTTests.cpp | 526 InsertionPoints.push_back(ND.getDeclContext()); in TEST() 610 hasReservedScope(*findUnqualifiedDecl(AST, "__foo").getDeclContext())); in TEST() 614 *findUnqualifiedDecl(AST, "error_code").getDeclContext())); in TEST() 618 hasReservedScope(*findUnqualifiedDecl(AST, "secret").getDeclContext())); in TEST()
|
| /llvm-project-15.0.7/clang/lib/Sema/ |
| H A D | SemaAccess.cpp | 66 DeclContext *DC = D->getDeclContext(); in FindDeclaringClass() 71 DC = cast<EnumDecl>(DC)->getDeclContext(); in FindDeclaringClass() 123 DC = Record->getDeclContext(); in EffectiveContext() 130 DC = Function->getDeclContext(); in EffectiveContext() 381 Context->getDeclContext(), in MightInstantiateTo() 382 Friend->getDeclContext())) in MightInstantiateTo() 491 if (!MightInstantiateTo(S, CTD->getDeclContext(), in MatchesFriend() 492 Friend->getDeclContext())) in MatchesFriend() 1136 if (D->getDeclContext() == DeclaringClass) in diagnoseBadDirectAccess() 1139 DeclContext *DC = D->getDeclContext(); in diagnoseBadDirectAccess() [all …]
|
| H A D | IdentifierResolver.cpp | 140 DeclContext *DCtx = D->getDeclContext()->getRedeclContext(); in isDeclInScope() 337 if (!PrevD->getDeclContext()->getRedeclContext()->isTranslationUnit()) { in tryAddTopLevelDecl() 367 if (!(*I)->getDeclContext()->getRedeclContext()->isTranslationUnit()) { in tryAddTopLevelDecl()
|
| H A D | SemaTemplateInstantiateDecl.cpp | 36 const DeclContext *DC = D->getDeclContext(); in isDeclWithinFunction() 864 if (Result && isa<CXXRecordDecl>(D->getDeclContext()) && in getPreviousDeclForInstantiation() 1863 } else if (InstTemplate->getDeclContext()->isRecord() && in VisitFunctionTemplateDecl() 2131 assert(D->getDeclContext()->isFileContext()); in VisitFunctionDecl() 2132 LexicalDC = D->getDeclContext(); in VisitFunctionDecl() 3667 assert(ClassTemplate->getDeclContext()->isRecord() && in VisitClassTemplateSpecializationDecl() 5237 OldVar->getPreviousDecl()->getDeclContext()==OldVar->getDeclContext())) { in BuildVariableInstantiation() 5258 if (NewVar->getDeclContext()->isFunctionOrMethod()) in BuildVariableInstantiation() 5306 NewVar->getDeclContext()->isFunctionOrMethod() && in BuildVariableInstantiation() 6016 DeclContext *ParentDC = D->getDeclContext(); in FindInstantiatedDecl() [all …]
|
| /llvm-project-15.0.7/clang/unittests/AST/ |
| H A D | ASTImporterTest.cpp | 4296 auto *DC = A0->getDeclContext(); in TEST_P() 4675 DC = P1->getDeclContext(); in TEST_P() 4736 ToD1->getDeclContext()); in TEST_P() 4740 ToD2->getDeclContext()); in TEST_P() 4747 ToD1Part->getDeclContext(), in TEST_P() 4785 ToD1->getDeclContext()); in TEST_P() 4789 ToD2->getDeclContext()); in TEST_P() 7584 ->getDeclContext(), in TEST_P() 7607 ->getDeclContext(), in TEST_P() 7650 ->getDeclContext(), in TEST_P() [all …]
|
| /llvm-project-15.0.7/lldb/source/Plugins/ExpressionParser/Clang/ |
| H A D | CxxModuleHandler.cpp | 192 if (!td->getDeclContext()->isStdNamespace()) in tryInstantiateStdTemplate() 208 getEqualLocalDeclContext(*m_sema, td->getDeclContext()); in tryInstantiateStdTemplate() 278 new_class_template->getDeclContext(), in tryInstantiateStdTemplate()
|
| /llvm-project-15.0.7/clang/unittests/Tooling/ |
| H A D | LookupTest.cpp | 57 Visitor.DeclStack.back()->getDeclContext(), FD, ReplacementString); in TEST() 196 nullptr, Loc, Visitor.DeclStack.back()->getDeclContext(), ND, in TEST()
|
| /llvm-project-15.0.7/clang/lib/Tooling/Refactoring/ |
| H A D | Lookup.cpp | 203 isa<TranslationUnitDecl>(FromDecl->getDeclContext()); in replaceNestedName() 208 !usingFromDifferentCanonicalNamespace(FromDecl->getDeclContext(), in replaceNestedName()
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/ |
| H A D | ASTSignals.cpp | 34 if (const auto *NSD = dyn_cast<NamespaceDecl>(ND->getDeclContext())) { in derive()
|