Home
last modified time | relevance | path

Searched refs:getAs (Results 1 – 25 of 275) sorted by relevance

1234567891011

/freebsd/contrib/llvm-project/clang/lib/Analysis/
H A DProgramPoint.cpp67 auto FEP = getAs<FunctionExitPoint>(); in printJson()
204 if (getAs<PreLoad>()) in printJson()
206 else if (getAs<PreStore>()) in printJson()
208 else if (getAs<PostAllocatorCall>()) in printJson()
210 else if (getAs<PostCondition>()) in printJson()
212 else if (getAs<PostLoad>()) in printJson()
214 else if (getAs<PostLValue>()) in printJson()
216 else if (getAs<PostStore>()) in printJson()
218 else if (getAs<PostStmt>()) in printJson()
220 else if (getAs<PostStmtPurgeDeadSymbols>()) in printJson()
[all …]
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/
H A DSVals.cpp47 if (std::optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>()) { in getAsFunctionDecl()
49 if (const FunctionCodeRegion *CTR = R->getAs<FunctionCodeRegion>()) in getAsFunctionDecl()
54 if (auto X = getAs<nonloc::PointerToMember>()) { in getAsFunctionDecl()
81 std::optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>(); in getLocSymbolInBase()
106 if (std::optional<nonloc::SymbolVal> X = getAs<nonloc::SymbolVal>()) in getAsSymbol()
113 if (auto CI = getAs<nonloc::ConcreteInt>()) in getAsInteger()
115 if (auto CI = getAs<loc::ConcreteInt>()) in getAsInteger()
121 if (std::optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>()) in getAsRegion()
124 if (std::optional<nonloc::LocAsInteger> X = getAs<nonloc::LocAsInteger>()) in getAsRegion()
247 return getAs<nonloc::ConcreteInt>() || getAs<loc::ConcreteInt>(); in isConstant()
[all …]
H A DExplodedGraph.cpp102 if (progPoint.getAs<PreStmtPurgeDeadSymbols>()) in shouldCollect()
106 if (!progPoint.getAs<PostStmt>() || progPoint.getAs<PostStore>()) in shouldCollect()
142 if (std::optional<StmtPoint> SP = SuccLoc.getAs<StmtPoint>()) in shouldCollect()
147 if (SuccLoc.getAs<CallEnter>() || SuccLoc.getAs<PreImplicitCall>()) in shouldCollect()
291 if (auto BEP = P.getAs<BlockEntrance>()) in getCFGBlock()
332 if (auto SP = P.getAs<StmtPoint>()) in getStmtForDiagnostics()
334 if (auto BE = P.getAs<BlockEdge>()) in getStmtForDiagnostics()
336 if (auto CE = P.getAs<CallEnter>()) in getStmtForDiagnostics()
338 if (auto CEE = P.getAs<CallExitEnd>()) in getStmtForDiagnostics()
340 if (auto PIPP = P.getAs<PostInitializer>()) in getStmtForDiagnostics()
[all …]
H A DCoreEngine.cpp214 assert(Loc.getAs<PostStmt>() || in dispatchWorkItem()
215 Loc.getAs<PostInitializer>() || in dispatchWorkItem()
216 Loc.getAs<PostImplicitCall>() || in dispatchWorkItem()
217 Loc.getAs<CallExitEnd>() || in dispatchWorkItem()
218 Loc.getAs<LoopExit>() || in dispatchWorkItem()
219 Loc.getAs<PostAllocatorCall>()); in dispatchWorkItem()
264 if (std::optional<CFGStmt> LastStmt = LastElement.getAs<CFGStmt>()) { in HandleBlockEdge()
267 LastElement.getAs<CFGAutomaticObjDtor>()) { in HandleBlockEdge()
536 if (N->getLocation().getAs<CallEnter>()) { in enqueueStmtNode()
544 if (N->getLocation().getAs<PostInitializer>() || in enqueueStmtNode()
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/Support/
H A DChrono.h146 template <typename AsPeriod> static InternalRep getAs(const Dur &D) {
155 return {getAs<std::nano>(D), "ns"};
157 return {getAs<std::micro>(D), "us"};
159 return {getAs<std::milli>(D), "ms"};
161 return {getAs<std::ratio<1>>(D), "s"};
163 return {getAs<std::ratio<60>>(D), "m"};
165 return {getAs<std::ratio<3600>>(D), "h"};
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/
H A DCheckPlacementNew.cpp83 if (auto ElementCountNL = ElementCount.getAs<NonLoc>()) { in getExtentSizeOfNewTarget()
107 const auto SizeOfTargetCI = SizeOfTarget.getAs<nonloc::ConcreteInt>(); in checkPlaceCapacityIsSufficient()
110 const auto SizeOfPlaceCI = SizeOfPlace.getAs<nonloc::ConcreteInt>(); in checkPlaceCapacityIsSufficient()
192 const DeclRegion *TheElementDeclRegion = SuperRegion->getAs<DeclRegion>(); in checkElementRegionAlign()
196 const DeclRegion *BaseDeclRegion = R->getBaseRegion()->getAs<DeclRegion>(); in checkElementRegionAlign()
242 if (const VarRegion *TheVarRegion = BaseRegion->getAs<VarRegion>()) { in checkFieldRegionAlign()
284 if (const ElementRegion *TheElementRegion = MRegion->getAs<ElementRegion>()) in checkPlaceIsAlignedProperly()
286 else if (const FieldRegion *TheFieldRegion = MRegion->getAs<FieldRegion>()) in checkPlaceIsAlignedProperly()
288 else if (const VarRegion *TheVarRegion = MRegion->getAs<VarRegion>()) in checkPlaceIsAlignedProperly()
H A DLLVMConventionsChecker.cpp30 const RecordType *RT = T->getAs<RecordType>(); in IsLLVMStringRef()
50 if (const ElaboratedType *QT = T->getAs<ElaboratedType>()) in IsStdString()
53 const TypedefType *TT = T->getAs<TypedefType>(); in IsStdString()
82 const TemplateSpecializationType *TS = T->getAs<TemplateSpecializationType>(); in IsStdVector()
96 const TemplateSpecializationType *TS = T->getAs<TemplateSpecializationType>(); in IsSmallVector()
203 if (const RecordType *baseT = T->getAs<RecordType>()) { in IsPartOfAST()
249 if (const RecordType *RT = T->getAs<RecordType>()) { in Visit()
H A DArrayBoundCheckerV2.cpp175 return SVB.evalBinOpNN(State, Op, L, R, T).getAs<NonLoc>(); in computeOffset()
185 const auto Index = CurRegion->getIndex().getAs<NonLoc>(); in computeOffset()
209 OwnerRegion = CurRegion->getSuperRegion()->getAs<SubRegion>(); in computeOffset()
244 std::optional<nonloc::SymbolVal> SymVal = offset.getAs<nonloc::SymbolVal>(); in getSimplifiedOffsets()
293 if (auto ConcreteThreshold = Threshold.getAs<nonloc::ConcreteInt>()) { in compareValueToThreshold()
331 .getAs<NonLoc>(); in compareValueToThreshold()
345 if (const auto *FR = Region->getAs<FieldRegion>()) { in getRegionName()
365 if (auto ConcreteVal = SV.getAs<nonloc::ConcreteInt>()) { in getConcreteValue()
410 const auto *EReg = Location.getAsRegion()->getAs<ElementRegion>(); in getExceedsMsgs()
611 if (auto KnownSize = Size.getAs<NonLoc>()) { in performCheck()
/freebsd/contrib/llvm-project/clang/lib/ExtractAPI/
H A DTypedefUnderlyingTypeResolver.cpp25 const TypedefType *TypedefTy = Type->getAs<TypedefType>(); in getUnderlyingTypeDecl()
28 if (const TagType *TagTy = Type->getAs<TagType>()) { in getUnderlyingTypeDecl()
31 Type->getAs<ObjCInterfaceType>()) { in getUnderlyingTypeDecl()
53 const TypedefType *TypedefTy = Type->getAs<TypedefType>(); in getSymbolReferenceForType()
/freebsd/contrib/llvm-project/clang/lib/AST/
H A DType.cpp552 while (const auto *PT = T->getAs<ParenType>()) in IgnoreParens()
578 template <> const TypedefType *Type::getAs() const { in getAs() function in Type
582 template <> const UsingType *Type::getAs() const { in getAs() function in Type
586 template <> const TemplateSpecializationType *Type::getAs() const { in getAs() function in Type
590 template <> const AttributedType *Type::getAs() const { in getAs() function in Type
594 template <> const BoundsAttributedType *Type::getAs() const { in getAs() function in Type
598 template <> const CountAttributedType *Type::getAs() const { in getAs() function in Type
624 if (const auto *RT = getAs<RecordType>()) in isClassType()
630 if (const auto *RT = getAs<RecordType>()) in isStructureType()
636 const auto *RT = getAs<RecordType>(); in isStructureTypeWithFlexibleArrayMember()
[all …]
H A DCXXInheritance.cpp133 const RecordType *Ty = I.getType()->getAs<RecordType>(); in forallBases()
193 DetectedVirtual = BaseType->getAs<RecordType>(); in lookupInBases()
251 BaseSpec.getType()->getAs<TemplateSpecializationType>(); in lookupInBases()
253 if (auto *RT = BaseSpec.getType()->getAs<RecordType>()) in lookupInBases()
336 if (const RecordType *Record = PE.Base->getType()->getAs<RecordType>()) in lookupInBases()
348 HidingP.back().Base->getType()->getAs<RecordType>()) in lookupInBases()
415 Specifier->getType()->getAs<TemplateSpecializationType>(); in findOrdinaryMemberInDependentClasses()
417 auto *RT = Specifier->getType()->getAs<RecordType>(); in findOrdinaryMemberInDependentClasses()
521 if (const RecordType *RT = Base.getType()->getAs<RecordType>()) { in Collect()
H A DFormatString.cpp333 const PointerType *PT = argTy->getAs<PointerType>(); in matchesType()
352 if (const auto *ETy = argTy->getAs<EnumType>()) { in matchesType()
362 if (const auto *BT = argTy->getAs<BuiltinType>()) { in matchesType()
397 if (const EnumType *ETy = argTy->getAs<EnumType>()) { in matchesType()
414 if (const auto *BT = argTy->getAs<BuiltinType>()) { in matchesType()
524 const PointerType *PT = argTy->getAs<PointerType>(); in matchesType()
528 if (const BuiltinType *BT = pointeeTy->getAs<BuiltinType>()) in matchesType()
543 const PointerType *PT = argTy->getAs<PointerType>(); in matchesType()
582 if (argTy->getAs<ObjCObjectPointerType>() || in matchesType()
583 argTy->getAs<BlockPointerType>()) in matchesType()
[all …]
/freebsd/contrib/llvm-project/clang/lib/CodeGen/
H A DABIInfoImpl.cpp30 if (const EnumType *EnumTy = Ty->getAs<EnumType>()) in classifyArgumentType()
34 if (const auto *EIT = Ty->getAs<BitIntType>()) in classifyArgumentType()
53 if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) in classifyReturnType()
56 if (const auto *EIT = RetTy->getAs<BitIntType>()) in classifyReturnType()
125 const RecordType *RT = T->getAs<RecordType>(); in getRecordArgABI()
135 if (const auto *RT = Ty->getAs<RecordType>()) in classifyReturnType()
271 const RecordType *RT = FT->getAs<RecordType>(); in isEmptyField()
294 const RecordType *RT = T->getAs<RecordType>(); in isEmptyRecord()
325 const RecordType *RT = T->getAs<RecordType>(); in isEmptyRecordForLayout()
349 const RecordType *RT = T->getAs<RecordType>(); in isSingleElementStruct()
[all …]
/freebsd/contrib/llvm-project/clang/lib/CodeGen/Targets/
H A DBPF.cpp49 if (const EnumType *EnumTy = Ty->getAs<EnumType>()) in classifyArgumentType()
53 if (const auto *EIT = Ty->getAs<BitIntType>()) in classifyArgumentType()
69 if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) in classifyReturnType()
73 if (const auto *EIT = RetTy->getAs<BitIntType>()) in classifyReturnType()
H A DPNaCl.cpp68 } else if (const EnumType *EnumTy = Ty->getAs<EnumType>()) { in classifyArgumentType()
74 } else if (const auto *EIT = Ty->getAs<BitIntType>()) { in classifyArgumentType()
95 if (const auto *EIT = RetTy->getAs<BitIntType>()) { in classifyReturnType()
102 if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) in classifyReturnType()
H A DPPC.cpp156 if (const EnumType *EnumTy = Ty->getAs<EnumType>()) in isPromotableTypeForABI()
169 if (const BuiltinType *BT = Ty->getAs<BuiltinType>()) in isPromotableTypeForABI()
226 if (const ComplexType *CTy = Ty->getAs<ComplexType>()) in getParamTypeAlignment()
254 if (const ComplexType *CTy = Ty->getAs<ComplexType>()) { in EmitVAArg()
294 Ty->isRecordType() ? Ty->getAs<RecordType>()->getDecl() : nullptr; in setTargetAttributes()
374 if (const ComplexType *CTy = Ty->getAs<ComplexType>()) in getParamTypeAlignment()
385 const BuiltinType *BT = EltType->getAs<BuiltinType>(); in getParamTypeAlignment()
439 if (const ComplexType *CTy = Ty->getAs<ComplexType>()) { in EmitVAArg()
646 const BuiltinType *BT = T->getAs<BuiltinType>(); in computeInfo()
705 if (const EnumType *EnumTy = Ty->getAs<EnumType>()) in isPromotableTypeForABI()
[all …]
H A DARM.cpp309 if (const VectorType *VT = Base->getAs<VectorType>()) { in classifyHomogeneousAggregate()
352 if (const EnumType *EnumTy = Ty->getAs<EnumType>()) { in classifyArgumentType()
356 if (const auto *EIT = Ty->getAs<BitIntType>()) in classifyArgumentType()
465 if (Ty->getAs<BuiltinType>() || Ty->isPointerType()) in isIntegerLikeType()
469 if (const ComplexType *CT = Ty->getAs<ComplexType>()) in isIntegerLikeType()
476 const RecordType *RT = Ty->getAs<RecordType>(); in isIntegerLikeType()
539 if (const VectorType *VT = RetTy->getAs<VectorType>()) { in classifyReturnType()
555 if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) in classifyReturnType()
558 if (const auto *EIT = RetTy->getAs<BitIntType>()) in classifyReturnType()
638 if (const VectorType *VT = Ty->getAs<VectorType> ()) { in isIllegalVectorType()
[all …]
H A DMips.cpp139 const RecordType *RT = Ty->getAs<RecordType>(); in HandleAggregates()
160 const BuiltinType *BT = Ty->getAs<BuiltinType>(); in HandleAggregates()
226 if (const EnumType *EnumTy = Ty->getAs<EnumType>()) in classifyArgumentType()
230 if (const auto *EIT = Ty->getAs<BitIntType>()) in classifyArgumentType()
246 const RecordType *RT = RetTy->getAs<RecordType>(); in returnAggregateInRegs()
266 const BuiltinType *BT = b->getType()->getAs<BuiltinType>(); in returnAggregateInRegs()
317 if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) in classifyReturnType()
321 if (const auto *EIT = RetTy->getAs<BitIntType>()) in classifyReturnType()
H A DSystemZ.cpp147 if (const EnumType *EnumTy = Ty->getAs<EnumType>()) in isPromotableIntegerTypeForABI()
154 if (const auto *EIT = Ty->getAs<BitIntType>()) in isPromotableIntegerTypeForABI()
159 if (const BuiltinType *BT = Ty->getAs<BuiltinType>()) in isPromotableIntegerTypeForABI()
186 if (const BuiltinType *BT = Ty->getAs<BuiltinType>()) in isFPArgumentType()
199 const RecordType *RT = Ty->getAs<RecordType>(); in GetSingleElementType()
440 if (const RecordType *RT = Ty->getAs<RecordType>()) { in classifyArgumentType()
512 if (const auto *RecordTy = Ty->getAs<RecordType>()) { in isVectorTypeBased()
524 if (const auto *FT = Ty->getAs<FunctionType>()) in isVectorTypeBased()
527 if (const FunctionProtoType *Proto = Ty->getAs<FunctionProtoType>()) in isVectorTypeBased()
/freebsd/contrib/llvm-project/clang/lib/Sema/
H A DSemaExceptionSpec.cpp30 if (const PointerType *PtrTy = T->getAs<PointerType>()) in GetUnderlyingFunction()
32 else if (const ReferenceType *RefTy = T->getAs<ReferenceType>()) in GetUnderlyingFunction()
34 else if (const MemberPointerType *MPTy = T->getAs<MemberPointerType>()) in GetUnderlyingFunction()
36 return T->getAs<FunctionProtoType>(); in GetUnderlyingFunction()
129 if (const PointerType *PT = T->getAs<PointerType>()) { in CheckSpecifiedExceptionType()
137 } else if (const ReferenceType *RT = T->getAs<ReferenceType>()) { in CheckSpecifiedExceptionType()
192 if (const PointerType *PT = T->getAs<PointerType>()) in CheckDistantExceptionSpec()
194 else if (const MemberPointerType *PT = T->getAs<MemberPointerType>()) in CheckDistantExceptionSpec()
199 const FunctionProtoType *FnT = T->getAs<FunctionProtoType>(); in CheckDistantExceptionSpec()
321 Old->getType()->getAs<FunctionProtoType>(), Old->getLocation(), in CheckEquivalentExceptionSpec()
[all …]
H A DSemaCast.cpp539 if (auto Ptr = From->getAs<PointerType>()) { in diagnoseBadCast()
544 if (auto Ptr = To->getAs<PointerType>()) { in diagnoseBadCast()
549 auto RecFrom = From->getAs<RecordType>(); in diagnoseBadCast()
550 auto RecTo = To->getAs<RecordType>(); in diagnoseBadCast()
805 const PointerType *DestPointer = DestType->getAs<PointerType>(); in CheckDynamicCast()
809 } else if ((DestReference = DestType->getAs<ReferenceType>())) { in CheckDynamicCast()
818 const RecordType *DestRecord = DestPointee->getAs<RecordType>(); in CheckDynamicCast()
842 if (const PointerType *SrcPointer = SrcType->getAs<PointerType>()) { in CheckDynamicCast()
865 const RecordType *SrcRecord = SrcPointee->getAs<RecordType>(); in CheckDynamicCast()
1144 if (const auto *PT = T->getAs<FunctionProtoType>()) in checkCastFunctionType()
[all …]
H A DSemaSwift.cpp51 if (const auto *PtrType = Ty->getAs<PointerType>()) { in isValidSwiftIndirectResultType()
53 } else if (const auto *RefType = Ty->getAs<ReferenceType>()) { in isValidSwiftIndirectResultType()
63 if (const auto *PtrType = Ty->getAs<PointerType>()) { in isValidSwiftErrorResultType()
65 } else if (const auto *RefType = Ty->getAs<ReferenceType>()) { in isValidSwiftErrorResultType()
104 const auto *PT = QT->getAs<PointerType>(); in isErrorParameter()
111 if (const auto *OPT = Pointee->getAs<ObjCObjectPointerType>()) in isErrorParameter()
117 if (const auto *PT = Pointee->getAs<PointerType>()) in isErrorParameter()
118 if (const auto *RT = PT->getPointeeType()->getAs<RecordType>()) in isErrorParameter()
219 ->getAs<FunctionProtoType>(); in checkSwiftAsyncErrorBlock()
250 if (const auto *ObjCPtrTy = Param->getAs<ObjCObjectPointerType>()) { in checkSwiftAsyncErrorBlock()
[all …]
H A DSemaBPF.cpp55 if (ArgType->getAs<TypedefType>()) in isValidPreserveTypeInfoArg()
60 if (const auto *RT = Ty->getAs<RecordType>()) { in isValidPreserveTypeInfoArg()
63 } else if (const auto *ET = Ty->getAs<EnumType>()) { in isValidPreserveTypeInfoArg()
103 const auto *ET = Ty->getAs<EnumType>(); in isValidPreserveEnumValueArg()
/freebsd/contrib/llvm-project/clang/lib/Index/
H A DUSRGeneration.cpp280 if (const auto *FPT = CanonicalType->getAs<FunctionProtoType>()) { in VisitFunctionDecl()
691 if (const PackExpansionType *Expansion = T->getAs<PackExpansionType>()) { in VisitType()
696 if (const BuiltinType *BT = T->getAs<BuiltinType>()) { in VisitType()
871 if (const PointerType *PT = T->getAs<PointerType>()) { in VisitType()
876 if (const ObjCObjectPointerType *OPT = T->getAs<ObjCObjectPointerType>()) { in VisitType()
881 if (const RValueReferenceType *RT = T->getAs<RValueReferenceType>()) { in VisitType()
886 if (const ReferenceType *RT = T->getAs<ReferenceType>()) { in VisitType()
891 if (const FunctionProtoType *FT = T->getAs<FunctionProtoType>()) { in VisitType()
904 if (const BlockPointerType *BT = T->getAs<BlockPointerType>()) { in VisitType()
909 if (const ComplexType *CT = T->getAs<ComplexType>()) { in VisitType()
[all …]
/freebsd/contrib/llvm-project/clang/lib/ARCMigrate/
H A DTransGCAttrs.cpp65 if (QualifiedTypeLoc QL = TL.getAs<QualifiedTypeLoc>()) { in lookForAttribute()
67 } else if (AttributedTypeLoc Attr = TL.getAs<AttributedTypeLoc>()) { in lookForAttribute()
72 TL.getAs<MacroQualifiedTypeLoc>()) { in lookForAttribute()
74 } else if (ArrayTypeLoc Arr = TL.getAs<ArrayTypeLoc>()) { in lookForAttribute()
76 } else if (PointerTypeLoc PT = TL.getAs<PointerTypeLoc>()) { in lookForAttribute()
78 } else if (ReferenceTypeLoc RT = TL.getAs<ReferenceTypeLoc>()) in lookForAttribute()
244 TL.getAs<AttributedTypeLoc>()) { in checkAllAtProps()

1234567891011