Home
last modified time | relevance | path

Searched refs:BaseDecl (Results 1 – 25 of 26) sorted by relevance

12

/freebsd/contrib/llvm-project/clang/lib/AST/
H A DVTTBuilder.cpp66 const auto *BaseDecl = in LayoutSecondaryVTTs() local
71 Layout.getBaseClassOffset(BaseDecl); in LayoutSecondaryVTTs()
74 LayoutVTT(BaseSubobject(BaseDecl, BaseOffset), /*BaseIsVirtual=*/false); in LayoutSecondaryVTTs()
92 const auto *BaseDecl = in LayoutSecondaryVirtualPointers() local
102 if (!BaseDecl->isDynamicClass()) in LayoutSecondaryVirtualPointers()
110 if (!VBases.insert(BaseDecl).second) in LayoutSecondaryVirtualPointers()
113 BaseOffset = MostDerivedClassLayout.getVBaseClassOffset(BaseDecl); in LayoutSecondaryVirtualPointers()
119 Layout.getBaseClassOffset(BaseDecl); in LayoutSecondaryVirtualPointers()
122 Layout.getPrimaryBase() == BaseDecl) in LayoutSecondaryVirtualPointers()
132 (BaseDecl->getNumVBases() || BaseDeclIsMorallyVirtual)) { in LayoutSecondaryVirtualPointers()
[all …]
H A DCXXInheritance.cpp78 const CXXRecordDecl *BaseDecl = Base->getCanonicalDecl(); in isDerivedFrom() local
80 [BaseDecl](const CXXBaseSpecifier *Specifier, CXXBasePath &Path) { in isDerivedFrom()
82 FindBaseClass(Specifier, Path, BaseDecl); in isDerivedFrom()
99 const CXXRecordDecl *BaseDecl = Base->getCanonicalDecl(); in isVirtuallyDerivedFrom() local
101 [BaseDecl](const CXXBaseSpecifier *Specifier, CXXBasePath &Path) { in isVirtuallyDerivedFrom()
102 return FindVirtualBaseClass(Specifier, Path, BaseDecl); in isVirtuallyDerivedFrom()
471 const CXXRecordDecl *BaseDecl = cast<CXXRecordDecl>(RT->getDecl()); in Collect() local
472 if (!BaseDecl->isPolymorphic()) in Collect()
478 Collect(BaseDecl, false, InVirtualSubobject, Overriders); in Collect()
490 CXXFinalOverriderMap *&MyVirtualOverriders = VirtualOverriders[BaseDecl]; in Collect()
[all …]
H A DRecordLayoutBuilder.cpp189 const CXXRecordDecl *BaseDecl = Base.getType()->getAsCXXRecordDecl(); in ComputeEmptySubobjectSizes() local
192 const ASTRecordLayout &Layout = Context.getASTRecordLayout(BaseDecl); in ComputeEmptySubobjectSizes()
193 if (BaseDecl->isEmpty()) { in ComputeEmptySubobjectSizes()
390 const CXXRecordDecl *BaseDecl = Base.getType()->getAsCXXRecordDecl(); in CanPlaceFieldSubobjectAtOffset() local
392 CharUnits BaseOffset = Offset + Layout.getBaseClassOffset(BaseDecl); in CanPlaceFieldSubobjectAtOffset()
393 if (!CanPlaceFieldSubobjectAtOffset(BaseDecl, Class, BaseOffset)) in CanPlaceFieldSubobjectAtOffset()
497 const CXXRecordDecl *BaseDecl = Base.getType()->getAsCXXRecordDecl(); in UpdateEmptyFieldSubobjects() local
499 CharUnits BaseOffset = Offset + Layout.getBaseClassOffset(BaseDecl); in UpdateEmptyFieldSubobjects()
500 UpdateEmptyFieldSubobjects(BaseDecl, Class, BaseOffset, in UpdateEmptyFieldSubobjects()
959 const CXXRecordDecl *BaseDecl = I.getType()->getAsCXXRecordDecl(); in ComputeBaseSubobjectInfo() local
[all …]
H A DVTableBuilder.cpp348 const CXXRecordDecl *BaseDecl = B.getType()->getAsCXXRecordDecl(); in ComputeBaseOffsets() local
354 if (SubobjectOffsets.count(std::make_pair(BaseDecl, 0))) in ComputeBaseOffsets()
360 BaseOffset = MostDerivedClassLayout.getVBaseClassOffset(BaseDecl); in ComputeBaseOffsets()
362 LayoutClassLayout.getVBaseClassOffset(BaseDecl); in ComputeBaseOffsets()
365 CharUnits Offset = Layout.getBaseClassOffset(BaseDecl); in ComputeBaseOffsets()
371 ComputeBaseOffsets(BaseSubobject(BaseDecl, BaseOffset), in ComputeBaseOffsets()
384 const CXXRecordDecl *BaseDecl = B.getType()->getAsCXXRecordDecl(); in dump() local
387 if (!BaseDecl->isPolymorphic()) in dump()
392 if (!VisitedVirtualBases.insert(BaseDecl).second) { in dump()
397 BaseOffset = MostDerivedClassLayout.getVBaseClassOffset(BaseDecl); in dump()
[all …]
H A DDeclCXX.cpp2306 const auto *BaseDecl = in mayBeAbstract() local
2308 if (BaseDecl->isAbstract()) in mayBeAbstract()
H A DExprConstant.cpp3299 const CXXRecordDecl *BaseDecl = Base->getType()->getAsCXXRecordDecl(); in HandleLValueBase() local
3302 return HandleLValueDirectBase(Info, E, Obj, DerivedDecl, BaseDecl); in HandleLValueBase()
3320 Obj.addDecl(Info, E, BaseDecl, /*Virtual*/ true); in HandleLValueBase()
3321 Obj.getLValueOffset() += Layout.getVBaseClassOffset(BaseDecl); in HandleLValueBase()
7413 CXXRecordDecl *BaseDecl = BS.getType()->getAsCXXRecordDecl(); in visitRecord() local
7421 Layout.getBaseClassOffset(BaseDecl) + Offset)) in visitRecord()
7685 CXXRecordDecl *BaseDecl = BS.getType()->getAsCXXRecordDecl(); in visit() local
7688 BS.getType(), Layout.getBaseClassOffset(BaseDecl) + Offset); in visit()
/freebsd/contrib/llvm-project/clang/lib/CodeGen/
H A DCGRecordLayoutBuilder.cpp723 const CXXRecordDecl *BaseDecl = Layout.getPrimaryBase(); in accumulateBases() local
725 getStorageType(BaseDecl), BaseDecl)); in accumulateBases()
734 const CXXRecordDecl *BaseDecl = Base.getType()->getAsCXXRecordDecl(); in accumulateBases() local
736 !Context.getASTRecordLayout(BaseDecl).getNonVirtualSize().isZero()) in accumulateBases()
737 Members.push_back(MemberInfo(Layout.getBaseClassOffset(BaseDecl), in accumulateBases()
738 MemberInfo::Base, getStorageType(BaseDecl), BaseDecl)); in accumulateBases()
882 const CXXRecordDecl *BaseDecl = Base.getType()->getAsCXXRecordDecl(); in calculateTailClippingOffset() local
887 if (Context.isNearlyEmpty(BaseDecl) && !hasOwnStorage(RD, BaseDecl)) in calculateTailClippingOffset()
890 Layout.getVBaseClassOffset(BaseDecl)); in calculateTailClippingOffset()
898 const CXXRecordDecl *BaseDecl = Base.getType()->getAsCXXRecordDecl(); in accumulateVBases() local
[all …]
H A DCGClass.cpp183 const auto *BaseDecl = in computeNonVirtualBaseClassOffset() local
187 Offset += Layout.getBaseClassOffset(BaseDecl); in computeNonVirtualBaseClassOffset()
189 RD = BaseDecl; in computeNonVirtualBaseClassOffset()
2641 auto *BaseDecl = in getVTablePointers() local
2645 if (!BaseDecl->isDynamicClass()) in getVTablePointers()
2654 if (!VBases.insert(BaseDecl).second) in getVTablePointers()
2660 BaseOffset = Layout.getVBaseClassOffset(BaseDecl); in getVTablePointers()
2666 BaseOffset = Base.getBaseOffset() + Layout.getBaseClassOffset(BaseDecl); in getVTablePointers()
2668 OffsetFromNearestVBase + Layout.getBaseClassOffset(BaseDecl); in getVTablePointers()
2669 BaseDeclIsNonVirtualPrimaryBase = Layout.getPrimaryBase() == BaseDecl; in getVTablePointers()
[all …]
H A DItaniumCXXABI.cpp3849 auto *BaseDecl = in CanUseSingleInheritance() local
3851 if (!BaseDecl->isEmpty() && in CanUseSingleInheritance()
3852 BaseDecl->isDynamicClass() != RD->isDynamicClass()) in CanUseSingleInheritance()
4366 auto *BaseDecl = in ComputeVMIClassTypeInfoFlags() local
4371 if (!Bases.VirtualBases.insert(BaseDecl).second) { in ComputeVMIClassTypeInfoFlags()
4376 if (Bases.NonVirtualBases.count(BaseDecl)) in ComputeVMIClassTypeInfoFlags()
4381 if (!Bases.NonVirtualBases.insert(BaseDecl).second) { in ComputeVMIClassTypeInfoFlags()
4386 if (Bases.VirtualBases.count(BaseDecl)) in ComputeVMIClassTypeInfoFlags()
4392 for (const auto &I : BaseDecl->bases()) in ComputeVMIClassTypeInfoFlags()
4466 auto *BaseDecl = in BuildVMIClassTypeInfo() local
[all …]
H A DMicrosoftCXXABI.cpp959 const CXXRecordDecl *BaseDecl = Base.getType()->getAsCXXRecordDecl(); in performBaseAdjustment() local
960 if (Context.getASTRecordLayout(BaseDecl).hasExtendableVFPtr()) { in performBaseAdjustment()
961 PolymorphicBase = BaseDecl; in performBaseAdjustment()
H A DCGExpr.cpp4230 if (const auto *BaseDecl = PointeeType->getAsRecordDecl()) in hasBPFPreserveStaticOffset() local
4231 return hasBPFPreserveStaticOffset(BaseDecl); in hasBPFPreserveStaticOffset()
/freebsd/contrib/llvm-project/clang/lib/AST/ByteCode/
H A DMemberPointer.cpp47 if (const RecordDecl *BaseDecl = Base.getDeclPtr().getRecord()->getDecl(); in toPointer() local
48 BaseDecl != FieldParent) in toPointer()
49 Offset += Ctx.collectBaseOffset(FieldParent, BaseDecl); in toPointer()
H A DContext.cpp549 unsigned Context::collectBaseOffset(const RecordDecl *BaseDecl, in collectBaseOffset() argument
551 assert(BaseDecl); in collectBaseOffset()
553 const auto *FinalDecl = cast<CXXRecordDecl>(BaseDecl); in collectBaseOffset()
563 const auto *BaseDecl = cast<CXXRecordDecl>(B.Decl); in collectBaseOffset() local
565 if (BaseDecl == FinalDecl || BaseDecl->isDerivedFrom(FinalDecl)) { in collectBaseOffset()
568 CurDecl = BaseDecl; in collectBaseOffset()
H A DContext.h110 unsigned collectBaseOffset(const RecordDecl *BaseDecl,
H A DCompiler.cpp3256 const auto *BaseDecl = Base.dyn_cast<const ValueDecl *>(); in VisitSourceLocExpr() local
3257 assert(BaseDecl); in VisitSourceLocExpr()
3259 auto *UGCD = cast<UnnamedGlobalConstantDecl>(BaseDecl); in VisitSourceLocExpr()
5914 const auto *BaseDecl = Base->getAsCXXRecordDecl(); in compileConstructor() local
5915 assert(BaseDecl); in compileConstructor()
5918 assert(R->getVirtualBase(BaseDecl)); in compileConstructor()
5919 if (!this->emitGetPtrThisVirtBase(BaseDecl, InitExpr)) in compileConstructor()
5925 const Record::Base *B = R->getBase(BaseDecl); in compileConstructor()
6706 const CXXRecordDecl *BaseDecl = extractRecordDecl(BaseType); in collectBaseOffset() local
6709 return Ctx.collectBaseOffset(BaseDecl, DerivedDecl); in collectBaseOffset()
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/
H A DStore.cpp283 const CXXRecordDecl *BaseDecl = BaseType->getPointeeCXXRecordDecl(); in evalDerivedToBase() local
284 if (!BaseDecl) in evalDerivedToBase()
285 BaseDecl = BaseType->getAsCXXRecordDecl(); in evalDerivedToBase()
286 assert(BaseDecl && "not a C++ object?"); in evalDerivedToBase()
292 if (SR->getSymbol()->getType()->getPointeeCXXRecordDecl() == BaseDecl) in evalDerivedToBase()
299 BaseDecl, cast<SubRegion>(DerivedReg), IsVirtual); in evalDerivedToBase()
/freebsd/contrib/llvm-project/clang/lib/Sema/
H A DSemaTypeTraits.cpp183 const auto *BaseDecl = B.getType()->getAsCXXRecordDecl(); in IsEligibleForTrivialRelocation() local
184 if (!BaseDecl) in IsEligibleForTrivialRelocation()
188 if (B.isVirtual() || (!BaseDecl->isDependentType() && in IsEligibleForTrivialRelocation()
218 const auto *BaseDecl = B.getType()->getAsCXXRecordDecl(); in IsEligibleForReplacement() local
219 if (!BaseDecl) in IsEligibleForReplacement()
222 if (!BaseDecl->isDependentType() && in IsEligibleForReplacement()
H A DSemaHLSL.cpp411 static IdentifierInfo *getHostLayoutStructName(Sema &S, NamedDecl *BaseDecl, in getHostLayoutStructName() argument
415 IdentifierInfo *NameBaseII = BaseDecl->getIdentifier(); in getHostLayoutStructName()
437 if (!findRecordDeclInContext(II, BaseDecl->getDeclContext())) in getHostLayoutStructName()
506 CXXRecordDecl *BaseDecl = Base.getType()->getAsCXXRecordDecl(); in createHostLayoutStruct() local
507 if (requiresImplicitBufferLayoutStructure(BaseDecl)) { in createHostLayoutStruct()
508 BaseDecl = createHostLayoutStruct(S, BaseDecl); in createHostLayoutStruct()
509 if (BaseDecl) { in createHostLayoutStruct()
511 QualType(BaseDecl->getTypeForDecl(), 0)); in createHostLayoutStruct()
516 if (BaseDecl) { in createHostLayoutStruct()
H A DSemaLookup.cpp3125 CXXRecordDecl *BaseDecl = cast<CXXRecordDecl>(BaseType->getDecl()); in addAssociatedClassesAndNamespaces() local
3126 if (Result.addClassTransitive(BaseDecl)) { in addAssociatedClassesAndNamespaces()
3128 DeclContext *BaseCtx = BaseDecl->getDeclContext(); in addAssociatedClassesAndNamespaces()
3132 if (BaseDecl->bases_begin() != BaseDecl->bases_end()) in addAssociatedClassesAndNamespaces()
3133 Bases.push_back(BaseDecl); in addAssociatedClassesAndNamespaces()
H A DSema.cpp1895 if (const auto *BaseDecl = dyn_cast<CXXRecordDecl>(RT->getDecl())) in VisitCalledDestructors() local
1896 if (BaseDecl->hasDefinition()) in VisitCalledDestructors()
1897 if (CXXDestructorDecl *BaseDtor = BaseDecl->getDestructor()) in VisitCalledDestructors()
H A DSemaDeclCXX.cpp2737 auto *BaseDecl = in CheckBaseSpecifier() local
2743 if (BaseDecl) { in CheckBaseSpecifier()
2746 if (BaseDecl->isUnion()) { in CheckBaseSpecifier()
2764 dyn_cast<ClassTemplateSpecializationDecl>(BaseDecl)) { in CheckBaseSpecifier()
2777 BaseDecl = BaseDecl->getDefinition(); in CheckBaseSpecifier()
2778 assert(BaseDecl && "Base type is not incomplete, but has no definition"); in CheckBaseSpecifier()
2783 const auto *BaseCSA = BaseDecl->getAttr<CodeSegAttr>(); in CheckBaseSpecifier()
2789 Diag(BaseDecl->getLocation(), diag::note_base_class_specified_here) in CheckBaseSpecifier()
2790 << BaseDecl; in CheckBaseSpecifier()
2800 if (BaseDecl->hasFlexibleArrayMember()) { in CheckBaseSpecifier()
[all …]
H A DSemaChecking.cpp1610 const auto *BaseDecl = in findConstantBaseAndOffset() local
1612 if (!BaseDecl) in findConstantBaseAndOffset()
1615 return {BaseDecl, Result.Val.getLValueOffset()}; in findConstantBaseAndOffset()
1680 auto [BaseDecl, Offset] = findConstantBaseAndOffset(S, Arg); in checkPointerAuthValue()
1684 if (!BaseDecl) in checkPointerAuthValue()
1688 else if (isa<FunctionDecl>(BaseDecl)) in checkPointerAuthValue()
1728 auto [BaseDecl, Offset] = findConstantBaseAndOffset(S, Pointer); in checkPointerAuthValue()
1729 if (!BaseDecl || !isa<VarDecl>(BaseDecl)) in checkPointerAuthValue()
14238 const CXXRecordDecl *BaseDecl = Base->getType()->getAsCXXRecordDecl(); in getDerivedToBaseAlignmentAndOffset() local
14245 Ctx.getASTRecordLayout(BaseDecl).getNonVirtualAlignment(); in getDerivedToBaseAlignmentAndOffset()
[all …]
H A DSemaExprCXX.cpp919 CXXRecordDecl *BaseDecl = BS.getType()->getAsCXXRecordDecl(); in collectPublicBases() local
924 NewSubobject = VBases.insert(BaseDecl).second; in collectPublicBases()
929 ++SubobjectsSeen[BaseDecl]; in collectPublicBases()
934 PublicSubobjectsSeen.insert(BaseDecl); in collectPublicBases()
937 collectPublicBases(BaseDecl, SubobjectsSeen, VBases, PublicSubobjectsSeen, in collectPublicBases()
H A DSemaInit.cpp9217 RecordDecl *BaseDecl in Diagnose() local
9220 S.Diag(BaseDecl->getLocation(), diag::note_previous_decl) in Diagnose()
9221 << S.Context.getTagDeclType(BaseDecl); in Diagnose()
/freebsd/contrib/llvm-project/clang/include/clang/ExtractAPI/
H A DExtractAPIVisitor.h186 if (auto *BaseDecl = BaseSpecifier.getType()->getAsTagDecl()) { in getBases() local
187 Bases.emplace_back(createSymbolReferenceForDecl(*BaseDecl)); in getBases()

12