Home
last modified time | relevance | path

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

12345678910>>...13

/src/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 …]
/src/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 …]
/src/contrib/llvm-project/clang/lib/AST/
H A DComment.cpp132 if (AttributedTypeLoc AttributeTL = TL.getAs<AttributedTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
135 if (QualifiedTypeLoc QualifiedTL = TL.getAs<QualifiedTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
138 if (PointerTypeLoc PointerTL = TL.getAs<PointerTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
141 if (ReferenceTypeLoc ReferenceTL = TL.getAs<ReferenceTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
144 if (AdjustedTypeLoc ATL = TL.getAs<AdjustedTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
146 if (BlockPointerTypeLoc BlockPointerTL = TL.getAs<BlockPointerTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
148 if (MemberPointerTypeLoc MemberPointerTL = TL.getAs<MemberPointerTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
150 if (ElaboratedTypeLoc ETL = TL.getAs<ElaboratedTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
163 if (FunctionTypeLoc FTL = TL.getAs<FunctionTypeLoc>()) { in getFunctionTypeLoc()
169 TL.getAs<TemplateSpecializationTypeLoc>()) { in getFunctionTypeLoc()
[all …]
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 …]
/src/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"};
/src/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 DCheckSecuritySyntaxOnly.cpp351 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_bcmp()
361 const PointerType *PT = FPT->getParamType(i)->getAs<PointerType>(); in checkCall_bcmp()
393 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_bcopy()
403 const PointerType *PT = FPT->getParamType(i)->getAs<PointerType>(); in checkCall_bcopy()
436 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_bzero()
445 const PointerType *PT = FPT->getParamType(0)->getAs<PointerType>(); in checkCall_bzero()
478 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_gets()
487 const PointerType *PT = FPT->getParamType(0)->getAs<PointerType>(); in checkCall_gets()
514 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_getpw()
527 const PointerType *PT = FPT->getParamType(1)->getAs<PointerType>(); in checkCall_getpw()
[all …]
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 DGTestChecker.cpp228 auto *RefTy = CtorDecl->getParamDecl(0)->getType()->getAs<ReferenceType>(); in checkPostCall()
261 State->getLValue(SuccessField, Instance).getAs<Loc>(); in getAssertionResultSuccessFieldValue()
272 auto DVal1 = Val1.getAs<DefinedOrUnknownSVal>(); in assumeValuesEqual()
273 auto DVal2 = Val2.getAs<DefinedOrUnknownSVal>(); in assumeValuesEqual()
278 C.getSValBuilder().evalEQ(State, *DVal1, *DVal2).getAs<DefinedSVal>(); in assumeValuesEqual()
H A DNSErrorChecker.cpp201 if (std::optional<loc::MemRegionVal> X = val.getAs<loc::MemRegionVal>()) { in parameterTypeFromSVal()
203 if (const VarRegion *VR = R->getAs<VarRegion>()) in parameterTypeFromSVal()
294 const PointerType* PPT = T->getAs<PointerType>(); in IsNSError()
299 PPT->getPointeeType()->getAs<ObjCObjectPointerType>(); in IsNSError()
314 const PointerType* PPT = T->getAs<PointerType>(); in IsCFError()
317 const TypedefType* TT = PPT->getPointeeType()->getAs<TypedefType>(); in IsCFError()
/src/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()
/src/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()
/src/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 …]
/src/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 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()
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 …]
/src/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 …]

12345678910>>...13