Home
last modified time | relevance | path

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

1234567891011

/freebsd-12-stable/contrib/llvm-project/clang/lib/Analysis/
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-12-stable/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/
DExplodedGraph.cpp103 if (progPoint.getAs<PreStmtPurgeDeadSymbols>()) in shouldCollect()
107 if (!progPoint.getAs<PostStmt>() || progPoint.getAs<PostStore>()) in shouldCollect()
143 if (Optional<StmtPoint> SP = SuccLoc.getAs<StmtPoint>()) in shouldCollect()
148 if (SuccLoc.getAs<CallEnter>() || SuccLoc.getAs<PreImplicitCall>()) in shouldCollect()
293 if (auto BEP = P.getAs<BlockEntrance>()) in getCFGBlock()
334 if (auto SP = P.getAs<StmtPoint>()) in getStmtForDiagnostics()
336 if (auto BE = P.getAs<BlockEdge>()) in getStmtForDiagnostics()
338 if (auto CE = P.getAs<CallEnter>()) in getStmtForDiagnostics()
340 if (auto CEE = P.getAs<CallExitEnd>()) in getStmtForDiagnostics()
342 if (auto PIPP = P.getAs<PostInitializer>()) in getStmtForDiagnostics()
[all …]
DSVals.cpp47 if (Optional<nonloc::SymbolVal> SV = getAs<nonloc::SymbolVal>()) { in hasConjuredSymbol()
53 if (Optional<loc::MemRegionVal> RV = getAs<loc::MemRegionVal>()) { in hasConjuredSymbol()
66 if (Optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>()) { in getAsFunctionDecl()
68 if (const FunctionCodeRegion *CTR = R->getAs<FunctionCodeRegion>()) in getAsFunctionDecl()
73 if (auto X = getAs<nonloc::PointerToMember>()) { in getAsFunctionDecl()
100 Optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>(); in getLocSymbolInBase()
125 if (Optional<nonloc::SymbolVal> X = getAs<nonloc::SymbolVal>()) in getAsSymbol()
132 if (Optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>()) in getAsRegion()
135 if (Optional<nonloc::LocAsInteger> X = getAs<nonloc::LocAsInteger>()) in getAsRegion()
260 return getAs<nonloc::ConcreteInt>() || getAs<loc::ConcreteInt>(); in isConstant()
[all …]
DCoreEngine.cpp185 assert(Loc.getAs<PostStmt>() || in dispatchWorkItem()
186 Loc.getAs<PostInitializer>() || in dispatchWorkItem()
187 Loc.getAs<PostImplicitCall>() || in dispatchWorkItem()
188 Loc.getAs<CallExitEnd>() || in dispatchWorkItem()
189 Loc.getAs<LoopExit>() || in dispatchWorkItem()
190 Loc.getAs<PostAllocatorCall>()); in dispatchWorkItem()
247 if (Optional<CFGStmt> LastStmt = LastElement.getAs<CFGStmt>()) { in HandleBlockEdge()
250 LastElement.getAs<CFGAutomaticObjDtor>()) { in HandleBlockEdge()
520 if (N->getLocation().getAs<CallEnter>()) { in enqueueStmtNode()
528 if (N->getLocation().getAs<PostInitializer>() || in enqueueStmtNode()
[all …]
DSimpleSValBuilder.cpp187 if (auto DV = Result.getAs<DefinedSVal>()) { in isInRelation()
631 if (auto simplifiedLhsAsNonLoc = simplifiedLhs.getAs<NonLoc>()) { in evalBinOpNN()
772 if (Optional<loc::ConcreteInt> rInt = rhs.getAs<loc::ConcreteInt>()) { in evalBinOpLL()
775 if (Optional<NonLoc> Result = ResultVal.getAs<NonLoc>()) in evalBinOpLL()
778 assert(!ResultVal.getAs<Loc>() && "Loc-Loc ops should not produce Locs"); in evalBinOpLL()
786 assert(rhs.getAs<loc::MemRegionVal>() || rhs.getAs<loc::GotoLabel>()); in evalBinOpLL()
807 if (Optional<loc::ConcreteInt> rInt = rhs.getAs<loc::ConcreteInt>()) { in evalBinOpLL()
904 Optional<NonLoc> LeftIndex = LeftIndexVal.getAs<NonLoc>(); in evalBinOpLL()
908 LeftIndex = LeftIndexVal.getAs<NonLoc>(); in evalBinOpLL()
914 Optional<NonLoc> RightIndex = RightIndexVal.getAs<NonLoc>(); in evalBinOpLL()
[all …]
DBugReporterVisitors.cpp192 const auto LLCV = LeftVal.getAs<nonloc::LazyCompoundVal>(); in hasVisibleUpdate()
196 const auto RLCV = RightVal.getAs<nonloc::LazyCompoundVal>(); in hasVisibleUpdate()
223 if (auto FieldL = State->getSVal(ME, LCtx).getAs<Loc>()) in getSValForVar()
233 if (auto CI = V->getAs<nonloc::ConcreteInt>()) in getConcreteIntegerValue()
831 auto BugPoint = BR.getErrorNode()->getLocation().getAs<StmtPoint>(); in VisitNode()
857 V.getAs<Loc>()) in addMacroVisitorIfNecessary()
858 BR.addVisitor<MacroNullReturnSuppressionVisitor>(R->getAs<SubRegion>(), in addMacroVisitorIfNecessary()
971 if ((LValue = V.getAs<Loc>())) { in visitNodeInitial()
973 if (RValue.getAs<DefinedSVal>()) in visitNodeInitial()
979 if (V.getAs<nonloc::LazyCompoundVal>() || in visitNodeInitial()
[all …]
/freebsd-12-stable/contrib/llvm-project/clang/lib/AST/
DComment.cpp134 if (AttributedTypeLoc AttributeTL = TL.getAs<AttributedTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
137 if (QualifiedTypeLoc QualifiedTL = TL.getAs<QualifiedTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
140 if (PointerTypeLoc PointerTL = TL.getAs<PointerTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
143 if (ReferenceTypeLoc ReferenceTL = TL.getAs<ReferenceTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
146 if (AdjustedTypeLoc ATL = TL.getAs<AdjustedTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
148 if (BlockPointerTypeLoc BlockPointerTL = TL.getAs<BlockPointerTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
150 if (MemberPointerTypeLoc MemberPointerTL = TL.getAs<MemberPointerTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
152 if (ElaboratedTypeLoc ETL = TL.getAs<ElaboratedTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
165 if (FunctionTypeLoc FTL = TL.getAs<FunctionTypeLoc>()) { in getFunctionTypeLoc()
171 TL.getAs<TemplateSpecializationTypeLoc>()) { in getFunctionTypeLoc()
[all …]
DType.cpp498 while (const auto *PT = T->getAs<ParenType>()) in IgnoreParens()
524 template <> const TypedefType *Type::getAs() const { in getAs() function in Type
528 template <> const TemplateSpecializationType *Type::getAs() const { in getAs() function in Type
532 template <> const AttributedType *Type::getAs() const { in getAs() function in Type
558 if (const auto *RT = getAs<RecordType>()) in isClassType()
564 if (const auto *RT = getAs<RecordType>()) in isStructureType()
570 if (const auto *RT = getAs<RecordType>()) in isObjCBoxableRecordType()
576 if (const auto *RT = getAs<RecordType>()) in isInterfaceType()
582 if (const auto *RT = getAs<RecordType>()) { in isStructureOrClassType()
590 if (const auto *PT = getAs<PointerType>()) in isVoidPointerType()
[all …]
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()
DFormatString.cpp327 const PointerType *PT = argTy->getAs<PointerType>(); in matchesType()
346 if (const EnumType *ETy = argTy->getAs<EnumType>()) { in matchesType()
354 if (const BuiltinType *BT = argTy->getAs<BuiltinType>()) in matchesType()
369 if (const EnumType *ETy = argTy->getAs<EnumType>()) { in matchesType()
382 if (const BuiltinType *BT = argTy->getAs<BuiltinType>()) in matchesType()
416 const PointerType *PT = argTy->getAs<PointerType>(); in matchesType()
420 if (const BuiltinType *BT = pointeeTy->getAs<BuiltinType>()) in matchesType()
435 const PointerType *PT = argTy->getAs<PointerType>(); in matchesType()
474 if (argTy->getAs<ObjCObjectPointerType>() || in matchesType()
475 argTy->getAs<BlockPointerType>()) in matchesType()
[all …]
/freebsd-12-stable/contrib/llvm-project/llvm/include/llvm/Support/
DChrono.h119 template <typename AsPeriod> static InternalRep getAs(const Dur &D) {
128 return {getAs<std::nano>(D), "ns"};
130 return {getAs<std::micro>(D), "us"};
132 return {getAs<std::milli>(D), "ms"};
134 return {getAs<std::ratio<1>>(D), "s"};
136 return {getAs<std::ratio<60>>(D), "m"};
138 return {getAs<std::ratio<3600>>(D), "h"};
/freebsd-12-stable/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/
DArrayBoundCheckerV2.cpp87 Optional<nonloc::SymbolVal> SymVal = offset.getAs<nonloc::SymbolVal>(); in getSimplifiedOffsets()
146 if (Optional<NonLoc> NV = extentBegin.getAs<NonLoc>()) { in checkLocation()
147 if (NV->getAs<nonloc::ConcreteInt>()) { in checkLocation()
159 Optional<NonLoc> lowerBoundToCheck = lowerBound.getAs<NonLoc>(); in checkLocation()
183 if (!Size.getAs<NonLoc>()) in checkLocation()
186 if (Size.getAs<nonloc::ConcreteInt>()) { in checkLocation()
198 Optional<NonLoc> upperboundToCheck = upperbound.getAs<NonLoc>(); in checkLocation()
278 return val.getAs<UndefinedVal>() ? svalBuilder.makeArrayIndex(0) : val; in getValue()
327 if (!index.getAs<NonLoc>()) in computeOffset()
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()
DGTestChecker.cpp138 if (!BooleanArgVal.getAs<Loc>()) in modelAssertionResultBoolConstructor()
229 auto *RefTy = CtorDecl->getParamDecl(0)->getType()->getAs<ReferenceType>(); in checkPostCall()
262 State->getLValue(SuccessField, Instance).getAs<Loc>(); in getAssertionResultSuccessFieldValue()
273 if (!Val1.getAs<DefinedOrUnknownSVal>() || in assumeValuesEqual()
274 !Val2.getAs<DefinedOrUnknownSVal>()) in assumeValuesEqual()
281 if (!ValuesEqual.getAs<DefinedSVal>()) in assumeValuesEqual()
DCheckSecuritySyntaxOnly.cpp353 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_bcmp()
363 const PointerType *PT = FPT->getParamType(i)->getAs<PointerType>(); in checkCall_bcmp()
395 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_bcopy()
405 const PointerType *PT = FPT->getParamType(i)->getAs<PointerType>(); in checkCall_bcopy()
438 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_bzero()
447 const PointerType *PT = FPT->getParamType(0)->getAs<PointerType>(); in checkCall_bzero()
480 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_gets()
489 const PointerType *PT = FPT->getParamType(0)->getAs<PointerType>(); in checkCall_gets()
516 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_getpw()
529 const PointerType *PT = FPT->getParamType(1)->getAs<PointerType>(); in checkCall_getpw()
[all …]
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()
DNSErrorChecker.cpp200 if (Optional<loc::MemRegionVal> X = val.getAs<loc::MemRegionVal>()) { in parameterTypeFromSVal()
202 if (const VarRegion *VR = R->getAs<VarRegion>()) in parameterTypeFromSVal()
217 if (loc.isUndef() || !loc.getAs<Loc>()) in checkLocation()
293 const PointerType* PPT = T->getAs<PointerType>(); in IsNSError()
298 PPT->getPointeeType()->getAs<ObjCObjectPointerType>(); in IsNSError()
313 const PointerType* PPT = T->getAs<PointerType>(); in IsCFError()
316 const TypedefType* TT = PPT->getPointeeType()->getAs<TypedefType>(); in IsCFError()
DNonNullParamChecker.cpp135 auto DV = V.getAs<DefinedSVal>(); in checkPreCall()
139 assert(!HasRefTypeParam || DV->getAs<Loc>()); in checkPreCall()
142 if (ExpectedToBeNonNull && !DV->getAs<Loc>()) { in checkPreCall()
153 auto CSV = DV->getAs<nonloc::CompoundVal>(); in checkPreCall()
160 DV = V.getAs<DefinedSVal>(); in checkPreCall()
164 if (!V.getAs<Loc>()) in checkPreCall()
DIterator.cpp191 } else if (const auto LCVal = Val.getAs<nonloc::LazyCompoundVal>()) { in getIteratorPosition()
204 } else if (const auto LCVal = Val.getAs<nonloc::LazyCompoundVal>()) { in setIteratorPosition()
239 const auto IntDistOp = Distance.getAs<nonloc::ConcreteInt>(); in advancePosition()
280 if (auto DV = IsCappedFromAbove.getAs<DefinedSVal>()) { in assumeNoOverflow()
290 if (auto DV = IsCappedFromBelow.getAs<DefinedSVal>()) { in assumeNoOverflow()
311 assert(comparison.getAs<DefinedSVal>() && in compare()
/freebsd-12-stable/contrib/llvm-project/clang/lib/Sema/
DSemaExceptionSpec.cpp29 if (const PointerType *PtrTy = T->getAs<PointerType>()) in GetUnderlyingFunction()
31 else if (const ReferenceType *RefTy = T->getAs<ReferenceType>()) in GetUnderlyingFunction()
33 else if (const MemberPointerType *MPTy = T->getAs<MemberPointerType>()) in GetUnderlyingFunction()
35 return T->getAs<FunctionProtoType>(); in GetUnderlyingFunction()
130 if (const PointerType *PT = T->getAs<PointerType>()) { in CheckSpecifiedExceptionType()
138 } else if (const ReferenceType *RT = T->getAs<ReferenceType>()) { in CheckSpecifiedExceptionType()
190 if (const PointerType *PT = T->getAs<PointerType>()) in CheckDistantExceptionSpec()
192 else if (const MemberPointerType *PT = T->getAs<MemberPointerType>()) in CheckDistantExceptionSpec()
197 const FunctionProtoType *FnT = T->getAs<FunctionProtoType>(); in CheckDistantExceptionSpec()
318 Old->getType()->getAs<FunctionProtoType>(), Old->getLocation(), in CheckEquivalentExceptionSpec()
[all …]
DSemaCast.cpp507 if (auto Ptr = From->getAs<PointerType>()) { in diagnoseBadCast()
512 if (auto Ptr = To->getAs<PointerType>()) { in diagnoseBadCast()
517 auto RecFrom = From->getAs<RecordType>(); in diagnoseBadCast()
518 auto RecTo = To->getAs<RecordType>(); in diagnoseBadCast()
773 const PointerType *DestPointer = DestType->getAs<PointerType>(); in CheckDynamicCast()
777 } else if ((DestReference = DestType->getAs<ReferenceType>())) { in CheckDynamicCast()
786 const RecordType *DestRecord = DestPointee->getAs<RecordType>(); in CheckDynamicCast()
810 if (const PointerType *SrcPointer = SrcType->getAs<PointerType>()) { in CheckDynamicCast()
833 const RecordType *SrcRecord = SrcPointee->getAs<RecordType>(); in CheckDynamicCast()
1088 if (const auto *PT = T->getAs<FunctionProtoType>()) in checkCastFunctionType()
[all …]
/freebsd-12-stable/contrib/llvm-project/clang/lib/Index/
DUSRGeneration.cpp653 if (const PackExpansionType *Expansion = T->getAs<PackExpansionType>()) { in VisitType()
658 if (const BuiltinType *BT = T->getAs<BuiltinType>()) { in VisitType()
788 if (const PointerType *PT = T->getAs<PointerType>()) { in VisitType()
793 if (const ObjCObjectPointerType *OPT = T->getAs<ObjCObjectPointerType>()) { in VisitType()
798 if (const RValueReferenceType *RT = T->getAs<RValueReferenceType>()) { in VisitType()
803 if (const ReferenceType *RT = T->getAs<ReferenceType>()) { in VisitType()
808 if (const FunctionProtoType *FT = T->getAs<FunctionProtoType>()) { in VisitType()
821 if (const BlockPointerType *BT = T->getAs<BlockPointerType>()) { in VisitType()
826 if (const ComplexType *CT = T->getAs<ComplexType>()) { in VisitType()
831 if (const TagType *TT = T->getAs<TagType>()) { in VisitType()
[all …]
/freebsd-12-stable/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/
DUninitializedPointee.cpp144 V.getAs<nonloc::LocAsInteger>()) && in isDereferencableUninit()
147 if (V.isUnknown() || V.getAs<loc::ConcreteInt>()) { in isDereferencableUninit()
234 V.getAs<nonloc::LocAsInteger>(); in dereference()
237 const auto *R = V.getAsRegion()->getAs<TypedValueRegion>(); in dereference()
248 R = Tmp->getAs<TypedValueRegion>(); in dereference()
/freebsd-12-stable/contrib/llvm-project/clang/lib/ARCMigrate/
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()
/freebsd-12-stable/contrib/llvm-project/clang/lib/CodeGen/
DTargetInfo.cpp107 if (const auto *EIT = Ty->getAs<ExtIntType>()) in isPromotableIntegerTypeForABI()
169 const RecordType *RT = T->getAs<RecordType>(); in getRecordArgABI()
179 if (const auto *RT = Ty->getAs<RecordType>()) in classifyReturnType()
520 const RecordType *RT = FT->getAs<RecordType>(); in isEmptyField()
545 const RecordType *RT = T->getAs<RecordType>(); in isEmptyRecord()
573 const RecordType *RT = T->getAs<RecordType>(); in isSingleElementStruct()
731 if (const EnumType *EnumTy = Ty->getAs<EnumType>()) in classifyArgumentType()
735 if (const auto *EIT = Ty->getAs<ExtIntType>()) in classifyArgumentType()
754 if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) in classifyReturnType()
757 if (const auto *EIT = RetTy->getAs<ExtIntType>()) in classifyReturnType()
[all …]

1234567891011