/freebsd/contrib/llvm-project/clang/lib/AST/ |
H A D | ASTImporterLookupTable.cpp | 98 if (auto *Ns = dyn_cast<NamespaceDecl>(D->getDeclContext())) in ASTImporterLookupTable() 100 add(D->getDeclContext(), D); in ASTImporterLookupTable() 128 DeclContext *DC = ND->getDeclContext()->getPrimaryContext(); in add() 137 DeclContext *DC = ND->getDeclContext()->getPrimaryContext(); in remove() 145 assert(OldDC != ND->getDeclContext() && in update() 147 if (contains(ND->getDeclContext(), ND)) { in update()
|
H A D | DeclObjC.cpp | 882 if (const auto *PD = dyn_cast<const ObjCProtocolDecl>(getDeclContext())) in definedInNSObject() 884 if (const auto *ID = dyn_cast<const ObjCInterfaceDecl>(getDeclContext())) in definedInNSObject() 893 const DeclContext *DC = getDeclContext(); in isDesignatedInitializerForTheInterface() 971 auto *CtxD = cast<Decl>(getDeclContext()); in getNextRedeclarationImpl() 999 if (Redecl && cast<Decl>(Redecl->getDeclContext())->isInvalidDecl()) in getNextRedeclarationImpl() 1013 auto *CtxD = cast<Decl>(getDeclContext()); in getCanonicalDecl() 1212 if (auto *ID = dyn_cast<ObjCInterfaceDecl>(getDeclContext())) in getClassInterface() 1214 if (auto *CD = dyn_cast<ObjCCategoryDecl>(getDeclContext())) in getClassInterface() 1216 if (auto *IMD = dyn_cast<ObjCImplDecl>(getDeclContext())) in getClassInterface() 1218 if (isa<ObjCProtocolDecl>(getDeclContext())) in getClassInterface() [all …]
|
H A D | DeclBase.cpp | 291 ? getLexicalDeclContext() : getDeclContext(); in isTemplated() 313 getFriendObjectKind() ? getLexicalDeclContext() : getDeclContext(); in getTemplateDepth() 319 : getDeclContext(); in getParentFunctionOrMethod() 367 setDeclContextsImpl(getDeclContext(), DC, getASTContext()); in setLexicalDeclContext() 416 for (const DeclContext *DC = getDeclContext(); DC; DC = DC->getParent()) { in isInAnonymousNamespace() 426 const DeclContext *DC = getDeclContext(); in isInStdNamespace() 512 DeclContext *DC = getDeclContext(); in getTranslationUnitDecl() 603 if (auto *dcd = dyn_cast<Decl>(getDeclContext())) { in getExternalSourceSymbolAttr() 1096 isa<NonTypeTemplateParmDecl>(this) || !getDeclContext() || in AccessDeclContextCheck() 1097 !isa<CXXRecordDecl>(getDeclContext()) || isInvalidDecl() || in AccessDeclContextCheck() [all …]
|
H A D | Decl.cpp | 101 return !getLexicalDeclContext()->Equals(getDeclContext()); in isOutOfLine() 305 const DeclContext *DC = D->getDeclContext(); in getOutermostFuncOrBlockContext() 580 if (const auto *SD = dyn_cast<LinkageSpecDecl>(D.getDeclContext())) in isSingleLineLanguageLinkage() 612 assert(D->getDeclContext()->getRedeclContext()->isFileContext() && in getLVForNamespaceScopeDecl() 706 for (const DeclContext *DC = D->getDeclContext(); in getLVForNamespaceScopeDecl() 864 LinkageInfo EnumLV = getLVForDecl(cast<NamedDecl>(D->getDeclContext()), in getLVForNamespaceScopeDecl() 958 getLVForDecl(cast<RecordDecl>(D->getDeclContext()), classComputation); in getLVForClassMember() 1103 if (!getDeclContext()->isFunctionOrMethod() && in isPlaceholderVar() 1104 !getDeclContext()->isRecord()) in isPlaceholderVar() 1118 BD && getDeclContext()->isFunctionOrMethod()) { in isPlaceholderVar() [all …]
|
H A D | QualTypeNames.cpp | 192 const DeclContext *DC = D->getDeclContext(); in createOuterNNS() 196 NS = dyn_cast<NamespaceDecl>(NS->getDeclContext()); in createOuterNNS() 272 const DeclContext *DC = Decl->getDeclContext()->getRedeclContext(); in createNestedNameSpecifierForScopeOf() 347 Namespace = dyn_cast<NamespaceDecl>(Namespace->getDeclContext()); in createNestedNameSpecifier()
|
H A D | TemplateName.cpp | 246 if (Template->getDeclContext() && in getDependence() 247 Template->getDeclContext()->isDependentContext()) in getDependence()
|
/freebsd/contrib/llvm-project/clang/lib/Index/ |
H A D | IndexDecl.cpp | 105 auto *DC = Parm->getDeclContext(); in handleDeclarator() 177 IndexCtx.handleReference(D, AttrLoc, cast<NamedDecl>(D->getDeclContext()), in handleObjCMethod() 178 D->getDeclContext(), 0); in handleObjCMethod() 264 Ctor->getParent(), Ctor->getDeclContext(), in VisitFunctionDecl() 281 Dtor->getParent(), Dtor->getDeclContext(), in VisitFunctionDecl() 287 Guide->getDeclContext()); in VisitFunctionDecl() 433 D->getDeclContext(), SymbolRoleSet()); in VisitObjCInterfaceDecl() 446 D->getDeclContext(), SymbolRoleSet()); in VisitObjCProtocolDecl() 540 auto *Container = cast<ObjCImplDecl>(D->getDeclContext()); in VisitObjCPropertyImplDecl() 586 D->getDeclContext(), SymbolRoleSet()); in VisitObjCPropertyImplDecl() [all …]
|
H A D | USRGeneration.cpp | 119 VisitDeclContext(D->getDeclContext()); in VisitUsingDecl() 218 VisitDeclContext(D->getDeclContext()); in VisitFieldDecl() 237 VisitDeclContext(D->getDeclContext()); in VisitFunctionDecl() 313 VisitDeclContext(D->getDeclContext()); in VisitNamedDecl() 332 VisitDeclContext(D->getDeclContext()); in VisitVarDecl() 386 VisitDeclContext(D->getDeclContext()); in VisitNamespaceDecl() 403 VisitDeclContext(D->getDeclContext()); in VisitNamespaceAliasDecl() 409 if (auto *CD = dyn_cast<ObjCCategoryDecl>(D->getDeclContext())) in getCategoryContext() 411 if (auto *ICD = dyn_cast<ObjCCategoryImplDecl>(D->getDeclContext())) in getCategoryContext() 417 const DeclContext *container = D->getDeclContext(); in VisitObjCMethodDecl() [all …]
|
H A D | IndexSymbol.cpp | 97 if (isa<ObjCProtocolDecl>(D->getDeclContext())) { in getSymbolInfo() 149 } else if (isa<CXXRecordDecl>(D->getDeclContext())) { in getSymbolInfo() 183 CXXRec = dyn_cast<CXXRecordDecl>(D->getDeclContext())) { in getSymbolInfo() 345 dyn_cast<CXXRecordDecl>(D->getDeclContext())) { in getSymbolInfo()
|
/freebsd/contrib/llvm-project/clang/lib/Sema/ |
H A D | SemaTemplateDeductionGuide.cpp | 102 if (WalkUp(Typedef->getDeclContext(), NestedPattern->getTemplatedDecl())) in mightReferToOuterTemplateParameters() 104 if (WalkUp(NestedPattern->getTemplatedDecl(), Typedef->getDeclContext())) in mightReferToOuterTemplateParameters() 144 bool InDependentContext = OrigDecl->getDeclContext()->isDependentContext(); in TransformTypedefType() 203 DeclContext *DC = OriginalTemplate->getDeclContext(); 311 DeclContext *DC = Template->getDeclContext(); 792 SemaRef, AliasTemplate->getDeclContext(), TP, Args, in buildAssociatedConstraints() 818 SemaRef, F->getDeclContext(), TP, Args, in buildAssociatedConstraints() 920 SemaRef, AliasTemplate->getDeclContext(), TP, Args, in buildIsDeducibleConstraint() 1083 SemaRef, AliasTemplate->getDeclContext(), TP, Args, in BuildDeductionGuideForTypeAlias() 1103 SemaRef, F->getDeclContext(), TP, Args, FPrimeTemplateParams.size(), in BuildDeductionGuideForTypeAlias() [all …]
|
H A D | HLSLExternalSemaSource.cpp | 78 if (HLSLNamespace && !Template && Record->getDeclContext() == HLSLNamespace) in ~BuiltinTypeDeclBuilder() 256 AST, MethodDecl->getDeclContext(), SourceLocation(), SourceLocation(), in addArraySubscriptOperator() 333 S.Context, Builder.Record->getDeclContext(), SourceLocation(), in addTypeParameter() 354 S.Context, Builder.Record->getDeclContext(), SourceLocation(), in finalizeTemplateArgs() 359 Builder.Template->setLexicalDeclContext(Builder.Record->getDeclContext()); in finalizeTemplateArgs() 363 Builder.Record->getDeclContext()->addDecl(Builder.Template); in finalizeTemplateArgs() 479 Template->setLexicalDeclContext(Record->getDeclContext()); in defineHLSLVectorAlias()
|
H A D | SemaAccess.cpp | 64 DeclContext *DC = D->getDeclContext(); in FindDeclaringClass() 69 DC = cast<EnumDecl>(DC)->getDeclContext(); in FindDeclaringClass() 73 DeclaringClass = cast<CXXRecordDecl>(DeclaringClass->getDeclContext()); in FindDeclaringClass() 121 DC = Record->getDeclContext(); in EffectiveContext() 128 DC = Function->getDeclContext(); in EffectiveContext() 286 const DeclContext *FromDC = From->getDeclContext()->getPrimaryContext(); in MightInstantiateTo() 287 const DeclContext *ToDC = To->getDeclContext()->getPrimaryContext(); in MightInstantiateTo() 389 Context->getDeclContext(), in MightInstantiateTo() 390 Friend->getDeclContext())) in MightInstantiateTo() 499 if (!MightInstantiateTo(S, CTD->getDeclContext(), in MatchesFriend() [all …]
|
H A D | SemaAPINotes.cpp | 825 if (D->getDeclContext()->isFileContext() || in ProcessAPINotes() 826 D->getDeclContext()->isNamespace() || in ProcessAPINotes() 827 D->getDeclContext()->isExternCContext() || in ProcessAPINotes() 828 D->getDeclContext()->isExternCXXContext()) { in ProcessAPINotes() 830 GetNamespaceContext(D->getDeclContext()); in ProcessAPINotes() 921 if (D->getDeclContext()->getRedeclContext()->isFileContext() || in ProcessAPINotes() 922 D->getDeclContext()->getRedeclContext()->isExternCContext()) { in ProcessAPINotes() 933 if (auto ObjCContainer = dyn_cast<ObjCContainerDecl>(D->getDeclContext())) { in ProcessAPINotes() 1017 if (auto CXXRecord = dyn_cast<CXXRecordDecl>(D->getDeclContext())) { in ProcessAPINotes() 1020 auto ParentContext = GetNamespaceContext(CXXRecord->getDeclContext()); in ProcessAPINotes()
|
H A D | SemaTemplateInstantiateDecl.cpp | 43 const DeclContext *DC = D->getDeclContext(); in isDeclWithinFunction() 337 auto *ThisContext = dyn_cast_or_null<CXXRecordDecl>(FD->getDeclContext()); in instantiateOMPDeclareSimdDeclAttr() 420 auto *ThisContext = dyn_cast_or_null<CXXRecordDecl>(FD->getDeclContext()); in instantiateOMPDeclareVariantAttr() 717 *this, dyn_cast_or_null<CXXRecordDecl>(ND->getDeclContext()), in InstantiateAttrsForDecl() 884 auto *ThisContext = dyn_cast_or_null<CXXRecordDecl>(ND->getDeclContext()); in InstantiateAttrs() 933 if (Result && isa<CXXRecordDecl>(D->getDeclContext()) && in getPreviousDeclForInstantiation() 1027 CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(D->getDeclContext()); in InstantiateTypedefNameDecl() 1347 if (CXXRecordDecl *Parent= dyn_cast<CXXRecordDecl>(Field->getDeclContext())) { in VisitFieldDecl() 1627 if (Pattern->getDeclContext()->isFunctionOrMethod() && in InstantiateEnumDefinition() 1698 Pattern->getDeclContext(), in VisitClassTemplateDecl() [all …]
|
H A D | SemaDeclObjC.cpp | 71 !isa<ObjCImplementationDecl>(method->getDeclContext())) in checkInitMethod() 79 if (isa<ObjCProtocolDecl>(method->getDeclContext())) { in checkInitMethod() 138 << cast<ObjCMethodDecl>(NewD->getDeclContext()); in diagnoseNoescape() 155 = dyn_cast<ObjCInterfaceDecl>(NewMethod->getDeclContext()); in CheckObjCMethodOverride() 157 DeclContext *DC = NewMethod->getDeclContext(); in CheckObjCMethodOverride() 451 dyn_cast<ObjCImplDecl>(MDecl->getDeclContext()); in ActOnStartOfObjCMethodDef() 453 dyn_cast<ObjCContainerDecl>(IMD->getDeclContext()); in ActOnStartOfObjCMethodDef() 864 !(isa<ObjCInterfaceDecl>(prevTypeParam->getDeclContext()) && in checkTypeParamListConsistency() 865 cast<ObjCInterfaceDecl>(prevTypeParam->getDeclContext()) in checkTypeParamListConsistency() 866 ->getDefinition() == prevTypeParam->getDeclContext())) { in checkTypeParamListConsistency() [all …]
|
H A D | SemaTemplate.cpp | 130 Record = cast<CXXRecordDecl>(Record->getDeclContext()); in getAsTemplateNameDecl() 813 << Instantiation->getDeclContext(); in DiagnoseUninstantiableTemplate() 844 << Instantiation->getDeclContext(); in DiagnoseUninstantiableTemplate() 1900 PrevDecl = cast<CXXRecordDecl>(PrevDecl->getDeclContext()); in CheckClassTemplate() 1922 (OutermostContext->Equals(PrevDecl->getDeclContext()) || in CheckClassTemplate() 1923 OutermostContext->Encloses(PrevDecl->getDeclContext()))) { in CheckClassTemplate() 1924 SemanticContext = PrevDecl->getDeclContext(); in CheckClassTemplate() 1955 PrevClassTemplate->getDeclContext()->getRedeclContext()->Equals( in CheckClassTemplate() 2111 NewTemplate->getDeclContext()->isRecord()) in CheckClassTemplate() 2730 if (TypeDecl *Parent = dyn_cast<TypeDecl>(Template->getDeclContext())) in MatchTemplateParametersToScopeSpecifier() [all …]
|
H A D | SemaDecl.cpp | 115 RD = cast<CXXRecordDecl>(RD->getDeclContext()); in ValidateCandidate() 1770 if (D->getDeclContext()->isFileContext()) in isUsingDeclNotAtClassScope() 1808 const DeclContext *DC = D->getDeclContext(); in mightHaveNonExternalLinkage() 1836 if (D->getDeclContext()->isDependentContext() || in ShouldWarnIfUnusedFileScopedDecl() 1946 bool WithinFunction = D->getDeclContext()->isFunctionOrMethod(); in ShouldDiagnoseUnusedDecl() 1947 if (const auto *R = dyn_cast<CXXRecordDecl>(D->getDeclContext())) in ShouldDiagnoseUnusedDecl() 2384 CurContext = New->getDeclContext(); in LazilyCreateBuiltin() 3240 cast<FunctionDecl>(oldDecl->getDeclContext())->getFirstDecl(); in mergeParamDeclAttributes() 3422 const DeclContext *DC = Old->getDeclContext(); in haveIncompatibleLanguageLinkages() 3463 !Old->getDeclContext()->getRedeclContext()->Equals( in checkUsingShadowRedecl() [all …]
|
H A D | SemaObjCProperty.cpp | 392 auto *OldDC = OldProperty->getDeclContext(); in checkAtomicPropertyMismatch() 433 if (PIDecl && isa<ObjCCategoryDecl>(PIDecl->getDeclContext())) { in HandlePropertyInClassExtension() 826 assert(isa<ObjCProtocolDecl>(Property->getDeclContext()) && in SelectPropertyForSynthesisFromProtocols() 1011 auto Category = dyn_cast<ObjCCategoryDecl>(Prop->getDeclContext()); in hasWrittenStorageAttribute() 1113 dyn_cast<ObjCCategoryDecl>(property->getDeclContext())) { in ActOnPropertyImplDecl() 1151 if (Synthesize && isa<ObjCProtocolDecl>(property->getDeclContext())) in ActOnPropertyImplDecl() 1656 isa<ObjCProtocolDecl>(SuperProperty->getDeclContext()))) { in DiagnosePropertyMismatch() 1908 dyn_cast<ObjCProtocolDecl>(Prop->getDeclContext())) { in DefaultSynthesizeProperties() 2268 if (getterRedecl->getDeclContext() != PD->getDeclContext()) in DiagnoseOwningPropertyGetterSynthesis() 2359 ObjCContainerDecl *CD = cast<ObjCContainerDecl>(property->getDeclContext()); in ProcessPropertyDecl()
|
H A D | SemaLambda.cpp | 102 VarToCapture->getDeclContext()->Equals(EnclosingDC)) in getStackIndexOfNearestEnclosingCaptureReadyLambda() 304 = Param->getDeclContext()->getLexicalParent()) in getCurrentMangleNumberContext() 310 else if (Var->getDeclContext()->isRecord() && IsInNonspecializedTemplate) in getCurrentMangleNumberContext() 463 ContextRAII ManglingContext(*this, Class->getDeclContext()); in handleLambdaNumbering() 473 auto DC = Class->getDeclContext(); in handleLambdaNumbering() 482 getCurrentMangleNumberContext(Class->getDeclContext()); in handleLambdaNumbering() 579 return cast<EnumDecl>(D->getDeclContext()); in findEnumForBlockReturn() 2240 !Class->getDeclContext()->isDependentContext()) { in BuildLambdaExpr()
|
/freebsd/contrib/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ |
H A D | CxxModuleHandler.cpp | 193 if (!td->getDeclContext()->isStdNamespace()) in tryInstantiateStdTemplate() 209 getEqualLocalDeclContext(*m_sema, td->getDeclContext()); in tryInstantiateStdTemplate() 280 new_class_template->getDeclContext(), in tryInstantiateStdTemplate()
|
/freebsd/contrib/llvm-project/clang/lib/ARCMigrate/ |
H A D | TransGCCalls.cpp | 48 if (!FD->getDeclContext()->getRedeclContext()->isFileContext()) in VisitCallExpr()
|
H A D | TransGCAttrs.cpp | 141 return isMigratable(cast<Decl>(D->getDeclContext())); in isMigratable() 263 cast<Decl>(IndProps.front()->getDeclContext()))) { in checkAllAtProps()
|
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
H A D | LLVMConventionsChecker.cpp | 40 const NamespaceDecl *ND = dyn_cast<NamespaceDecl>(D->getDeclContext()); in InNamespace() 46 return isa<TranslationUnitDecl>(ND->getDeclContext()); in InNamespace()
|
/freebsd/contrib/llvm-project/clang/lib/Serialization/ |
H A D | ASTWriterDecl.cpp | 291 if (!VD->getDeclContext()->getRedeclContext()->isFileContext() || in CanElideDeclDef() 378 DeclBits.addBit(D->getDeclContext() != D->getLexicalDeclContext()); in VisitDecl() 384 Record.AddDeclRef(cast_or_null<Decl>(D->getDeclContext())); in VisitDecl() 385 if (D->getDeclContext() != D->getLexicalDeclContext()) in VisitDecl() 402 auto *DC = D->getDeclContext(); in VisitDecl() 466 if (D->getDeclContext() == D->getLexicalDeclContext() && in VisitTypedefDecl() 545 if (D->getDeclContext() == D->getLexicalDeclContext() && !D->hasAttrs() && in VisitEnumDecl() 586 if (D->getDeclContext() == D->getLexicalDeclContext() && !D->hasAttrs() && in VisitRecordDecl() 912 if (D->getDeclContext() == D->getLexicalDeclContext() && in VisitObjCIvarDecl() 1044 if (D->getDeclContext() == D->getLexicalDeclContext() && in VisitFieldDecl() [all …]
|
/freebsd/contrib/llvm-project/clang/lib/CodeGen/ |
H A D | CGDebugInfo.cpp | 217 return getContextDescriptor(cast<Decl>(D->getDeclContext()), in getDeclContextDescriptor() 279 const DeclContext *DC = OMD->getDeclContext(); in getObjCMethodName() 319 assert(RD->getDeclContext() == D->getDeclContext() && in getClassName() 1498 const DeclContext *DC = Ty->getDecl()->getDeclContext(); in CreateType() 1931 nestedType->getDeclContext() == record) in CollectRecordFields() 2013 if (const auto *NRD = dyn_cast<CXXRecordDecl>(RD->getDeclContext())) in isFunctionLocalClass() 2015 if (isa<FunctionDecl>(RD->getDeclContext())) in isFunctionLocalClass() 3910 dyn_cast<CXXRecordDecl>(CXXRD->getDeclContext())); in CreateLimitedType() 4017 dyn_cast_or_null<NamespaceDecl>(FD->getDeclContext())) in collectFunctionDeclProps() 4020 dyn_cast_or_null<RecordDecl>(FD->getDeclContext())) { in collectFunctionDeclProps() [all …]
|