Home
last modified time | relevance | path

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

123456789

/external/clang/lib/StaticAnalyzer/Core/
DSVals.cpp33 if (Optional<nonloc::SymbolVal> SV = getAs<nonloc::SymbolVal>()) { in hasConjuredSymbol()
39 if (Optional<loc::MemRegionVal> RV = getAs<loc::MemRegionVal>()) { in hasConjuredSymbol()
52 if (Optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>()) { in getAsFunctionDecl()
54 if (const FunctionCodeRegion *CTR = R->getAs<FunctionCodeRegion>()) in getAsFunctionDecl()
71 if (Optional<nonloc::LocAsInteger> X = getAs<nonloc::LocAsInteger>()) in getAsLocSymbol()
74 if (Optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>()) { in getAsLocSymbol()
86 Optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>(); in getLocSymbolInBase()
113 if (Optional<nonloc::SymbolVal> X = getAs<nonloc::SymbolVal>()) in getAsSymbol()
122 if (Optional<nonloc::SymbolVal> X = getAs<nonloc::SymbolVal>()) in getAsSymbolicExpression()
136 if (Optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>()) in getAsRegion()
[all …]
DBugReporterVisitors.cpp187 while (Node && Node->getLocation().getAs<PostStmt>()) in addVisitorIfNecessary()
207 if (Optional<Loc> LValue = RetVal.getAs<Loc>()) in addVisitorIfNecessary()
217 if (Optional<Loc> RetLoc = RetVal.getAs<Loc>()) in addVisitorIfNecessary()
263 if ((LValue = V.getAs<Loc>())) { in visitNodeInitial()
265 if (RValue.getAs<DefinedSVal>()) in visitNodeInitial()
271 if (V.getAs<nonloc::LazyCompoundVal>() || in visitNodeInitial()
272 V.getAs<nonloc::CompoundVal>()) in visitNodeInitial()
294 if (V.getAs<Loc>()) { in visitNodeInitial()
362 Optional<Loc> ArgV = Call->getArgSVal(I).getAs<Loc>(); in visitNodeMaybeUnsuppress()
536 V.getAs<loc::ConcreteInt>() || V.getAs<nonloc::ConcreteInt>()) { in VisitNode()
[all …]
DSimpleSValBuilder.cpp63 assert(Val.getAs<Loc>() || Val.getAs<NonLoc>()); in dispatchCast()
64 return Val.getAs<Loc>() ? evalCastFromLoc(Val.castAs<Loc>(), CastTy) in dispatchCast()
72 if (Optional<nonloc::LocAsInteger> LI = val.getAs<nonloc::LocAsInteger>()) { in evalCastFromNonLoc()
101 if (!val.getAs<nonloc::ConcreteInt>()) in evalCastFromNonLoc()
169 if (!val.getAs<loc::ConcreteInt>()) in evalCastFromLoc()
658 if (Optional<loc::ConcreteInt> rInt = rhs.getAs<loc::ConcreteInt>()) { in evalBinOpLL()
661 if (Optional<NonLoc> Result = ResultVal.getAs<NonLoc>()) in evalBinOpLL()
664 assert(!ResultVal.getAs<Loc>() && "Loc-Loc ops should not produce Locs"); in evalBinOpLL()
672 assert(rhs.getAs<loc::MemRegionVal>() || rhs.getAs<loc::GotoLabel>()); in evalBinOpLL()
693 if (Optional<loc::ConcreteInt> rInt = rhs.getAs<loc::ConcreteInt>()) { in evalBinOpLL()
[all …]
DSValBuilder.cpp81 if (Optional<nonloc::ConcreteInt> CI = val.getAs<nonloc::ConcreteInt>()) { in convertToArrayIndex()
350 if (Optional<nonloc::ConcreteInt> rInt = RHS.getAs<nonloc::ConcreteInt>()) in makeSymExprValNN()
354 if (Optional<nonloc::ConcreteInt> lInt = LHS.getAs<nonloc::ConcreteInt>()) in makeSymExprValNN()
370 if (lhs.getAs<nonloc::LazyCompoundVal>() || in evalBinOp()
371 rhs.getAs<nonloc::LazyCompoundVal>()) { in evalBinOp()
375 if (Optional<Loc> LV = lhs.getAs<Loc>()) { in evalBinOp()
376 if (Optional<Loc> RV = rhs.getAs<Loc>()) in evalBinOp()
382 if (Optional<Loc> RV = rhs.getAs<Loc>()) { in evalBinOp()
493 if (Optional<Loc> L = val.getAs<Loc>()) in evalCast()
512 if (Optional<nonloc::LocAsInteger> LV = val.getAs<nonloc::LocAsInteger>()) { in evalCast()
DExplodedGraph.cpp113 if (progPoint.getAs<PreStmtPurgeDeadSymbols>()) in shouldCollect()
117 if (!progPoint.getAs<PostStmt>() || progPoint.getAs<PostStore>()) in shouldCollect()
153 if (Optional<StmtPoint> SP = SuccLoc.getAs<StmtPoint>()) in shouldCollect()
158 if (SuccLoc.getAs<CallEnter>() || SuccLoc.getAs<PreImplicitCall>()) in shouldCollect()
/external/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()
85 if (const PointerType *PT = T->getAs<PointerType>()) { in CheckSpecifiedExceptionType()
93 } else if (const ReferenceType *RT = T->getAs<ReferenceType>()) { in CheckSpecifiedExceptionType()
121 PointeeT->getAs<RecordType>()->isBeingDefined()) && in CheckSpecifiedExceptionType()
132 if (const PointerType *PT = T->getAs<PointerType>()) in CheckDistantExceptionSpec()
134 else if (const MemberPointerType *PT = T->getAs<MemberPointerType>()) in CheckDistantExceptionSpec()
139 const FunctionProtoType *FnT = T->getAs<FunctionProtoType>(); in CheckDistantExceptionSpec()
[all …]
DSemaCast.cpp397 if (auto Ptr = From->getAs<PointerType>()) { in diagnoseBadCast()
402 if (auto Ptr = To->getAs<PointerType>()) { in diagnoseBadCast()
407 auto RecFrom = From->getAs<RecordType>(); in diagnoseBadCast()
408 auto RecTo = To->getAs<RecordType>(); in diagnoseBadCast()
428 const PointerType *T1PtrType = T1->getAs<PointerType>(), in UnwrapDissimilarPointerTypes()
429 *T2PtrType = T2->getAs<PointerType>(); in UnwrapDissimilarPointerTypes()
436 T1->getAs<ObjCObjectPointerType>(), in UnwrapDissimilarPointerTypes()
438 T2->getAs<ObjCObjectPointerType>(); in UnwrapDissimilarPointerTypes()
459 const MemberPointerType *T1MPType = T1->getAs<MemberPointerType>(), in UnwrapDissimilarPointerTypes()
460 *T2MPType = T2->getAs<MemberPointerType>(); in UnwrapDissimilarPointerTypes()
[all …]
DSemaOverload.cpp246 if (const PointerType* ToPtrType = ToType->getAs<PointerType>()) in isPointerConversionToVoidPointer()
300 if (auto *ET = ToType->getAs<EnumType>()) in getNarrowingKind()
1308 if (ToType->getAs<RecordType>() && FromType->getAs<RecordType>() && in TryImplicitConversion()
1403 CanTo = CanTo.getAs<PointerType>()->getPointeeType(); in IsNoReturnConversion()
1404 CanFrom = CanFrom.getAs<PointerType>()->getPointeeType(); in IsNoReturnConversion()
1406 CanTo = CanTo.getAs<BlockPointerType>()->getPointeeType(); in IsNoReturnConversion()
1407 CanFrom = CanFrom.getAs<BlockPointerType>()->getPointeeType(); in IsNoReturnConversion()
1409 CanTo = CanTo.getAs<MemberPointerType>()->getPointeeType(); in IsNoReturnConversion()
1410 CanFrom = CanFrom.getAs<MemberPointerType>()->getPointeeType(); in IsNoReturnConversion()
1578 if (const AtomicType *Atomic = FromType->getAs<AtomicType>()) in IsStandardConversion()
[all …]
/external/parameter-framework/upstream/parameter/
DElementHandle.cpp224 bool ElementHandle::getAs(T &value, string &error) const in getAs() function in ElementHandle
248 return getAs(value, error); in getAsBoolean()
258 return getAs(value, error); in getAsBooleanArray()
269 return getAs(value, error); in getAsInteger()
279 return getAs(value, error); in getAsIntegerArray()
290 return getAs(value, error); in getAsSignedInteger()
300 return getAs(value, error); in getAsSignedIntegerArray()
311 return getAs(value, error); in getAsDouble()
321 return getAs(value, error); in getAsDoubleArray()
332 return getAs(value, error); in getAsString()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/Support/
DChrono.h112 template <typename AsPeriod> static InternalRep getAs(const Dur &D) {
121 return {getAs<std::nano>(D), "ns"};
123 return {getAs<std::micro>(D), "us"};
125 return {getAs<std::milli>(D), "ms"};
127 return {getAs<std::ratio<1>>(D), "s"};
129 return {getAs<std::ratio<60>>(D), "m"};
131 return {getAs<std::ratio<3600>>(D), "h"};
/external/clang/lib/AST/
DComment.cpp242 if (QualifiedTypeLoc QualifiedTL = TL.getAs<QualifiedTypeLoc>()) { in fill()
247 if (PointerTypeLoc PointerTL = TL.getAs<PointerTypeLoc>()) { in fill()
252 if (ReferenceTypeLoc ReferenceTL = TL.getAs<ReferenceTypeLoc>()) { in fill()
257 if (AdjustedTypeLoc ATL = TL.getAs<AdjustedTypeLoc>()) { in fill()
262 TL.getAs<BlockPointerTypeLoc>()) { in fill()
267 TL.getAs<MemberPointerTypeLoc>()) { in fill()
271 if (ElaboratedTypeLoc ETL = TL.getAs<ElaboratedTypeLoc>()) { in fill()
276 if (FunctionTypeLoc FTL = TL.getAs<FunctionTypeLoc>()) { in fill()
283 TL.getAs<TemplateSpecializationTypeLoc>()) { in fill()
295 if (FunctionTypeLoc FTL = TL.getAs<FunctionTypeLoc>()) { in fill()
DType.cpp53 ND = ty->getAs<RecordType>()->getDecl(); in getBaseTypeIdentifier()
55 ND = ty->getAs<EnumType>()->getDecl(); in getBaseTypeIdentifier()
57 ND = ty->getAs<TypedefType>()->getDecl(); in getBaseTypeIdentifier()
300 while (const ParenType *PT = T->getAs<ParenType>()) in IgnoreParens()
326 template <> const TypedefType *Type::getAs() const { in getAs() function in Type
330 template <> const TemplateSpecializationType *Type::getAs() const { in getAs() function in Type
334 template <> const AttributedType *Type::getAs() const { in getAs() function in Type
359 if (const RecordType *RT = getAs<RecordType>()) in isClassType()
364 if (const RecordType *RT = getAs<RecordType>()) in isStructureType()
369 if (const RecordType *RT = getAs<RecordType>()) in isObjCBoxableRecordType()
[all …]
/external/clang/lib/StaticAnalyzer/Checkers/
DNonNullParamChecker.cpp97 Optional<DefinedSVal> DV = V.getAs<DefinedSVal>(); in checkPreCall()
102 assert(!haveRefTypeParam || DV->getAs<Loc>()); in checkPreCall()
104 if (haveAttrNonNull && !DV->getAs<Loc>()) { in checkPreCall()
116 DV->getAs<nonloc::CompoundVal>()) { in checkPreCall()
120 DV = V.getAs<DefinedSVal>(); in checkPreCall()
124 if (!V.getAs<Loc>()) in checkPreCall()
DNSErrorChecker.cpp191 if (Optional<loc::MemRegionVal> X = val.getAs<loc::MemRegionVal>()) { in parameterTypeFromSVal()
193 if (const VarRegion *VR = R->getAs<VarRegion>()) in parameterTypeFromSVal()
208 if (loc.isUndef() || !loc.getAs<Loc>()) in checkLocation()
283 const PointerType* PPT = T->getAs<PointerType>(); in IsNSError()
288 PPT->getPointeeType()->getAs<ObjCObjectPointerType>(); in IsNSError()
303 const PointerType* PPT = T->getAs<PointerType>(); in IsCFError()
306 const TypedefType* TT = PPT->getPointeeType()->getAs<TypedefType>(); in IsCFError()
DBoolAssignmentChecker.cpp46 if (const TypedefType *TT = Ty->getAs<TypedefType>()) in isBooleanType()
72 Optional<DefinedSVal> DV = val.getAs<DefinedSVal>(); in checkBind()
90 greaterThanOrEqualToZeroVal.getAs<DefinedSVal>(); in checkBind()
126 lessThanEqToOneVal.getAs<DefinedSVal>(); in checkBind()
DLLVMConventionsChecker.cpp31 const RecordType *RT = T->getAs<RecordType>(); in IsLLVMStringRef()
52 if (const ElaboratedType *QT = T->getAs<ElaboratedType>()) in IsStdString()
55 const TypedefType *TT = T->getAs<TypedefType>(); in IsStdString()
84 const TemplateSpecializationType *TS = T->getAs<TemplateSpecializationType>(); in IsStdVector()
98 const TemplateSpecializationType *TS = T->getAs<TemplateSpecializationType>(); in IsSmallVector()
205 if (const RecordType *baseT = T->getAs<RecordType>()) { in IsPartOfAST()
251 if (const RecordType *RT = T->getAs<RecordType>()) { in Visit()
DArrayBoundCheckerV2.cpp113 if (Optional<NonLoc> NV = extentBegin.getAs<NonLoc>()) { in checkLocation()
118 Optional<NonLoc> lowerBoundToCheck = lowerBound.getAs<NonLoc>(); in checkLocation()
142 if (!extentVal.getAs<NonLoc>()) in checkLocation()
150 Optional<NonLoc> upperboundToCheck = upperbound.getAs<NonLoc>(); in checkLocation()
227 return val.getAs<UndefinedVal>() ? svalBuilder.makeArrayIndex(0) : val; in getValue()
276 if (!index.getAs<NonLoc>()) in computeOffset()
DCheckSecuritySyntaxOnly.cpp310 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_gets()
319 const PointerType *PT = FPT->getParamType(0)->getAs<PointerType>(); in checkCall_gets()
346 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_getpw()
359 const PointerType *PT = FPT->getParamType(1)->getAs<PointerType>(); in checkCall_getpw()
390 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_mktemp()
399 const PointerType *PT = FPT->getParamType(0)->getAs<PointerType>(); in checkCall_mktemp()
559 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_strCommon()
571 const PointerType *PT = FPT->getParamType(i)->getAs<PointerType>(); in checkCall_strCommon()
593 const FunctionProtoType *FTP = FD->getType()->getAs<FunctionProtoType>(); in checkCall_rand()
600 const PointerType *PT = FTP->getParamType(0)->getAs<PointerType>(); in checkCall_rand()
[all …]
DDynamicTypePropagation.cpp313 = MsgE->getClassReceiver()->getAs<ObjCObjectType>()) in getObjectTypeForAllocAndNew()
319 = MsgE->getSuperType()->getAs<ObjCObjectType>()) in getObjectTypeForAllocAndNew()
353 CastE->getType()->getAs<ObjCObjectPointerType>(); in getBetterObjCType()
361 OldDTy->getAs<ObjCObjectPointerType>(); in getBetterObjCType()
399 To->getObjectType()->getSuperClassType()->getAs<ObjCObjectType>(); in getMostInformativeDerivedClassImpl()
403 const auto *SuperPtrOfTo = SuperPtrOfToQual->getAs<ObjCObjectPointerType>(); in getMostInformativeDerivedClassImpl()
530 const auto *OrigObjectPtrType = OriginType->getAs<ObjCObjectPointerType>(); in checkPostStmt()
531 const auto *DestObjectPtrType = DestType->getAs<ObjCObjectPointerType>(); in checkPostStmt()
657 ReceiverType->getAs<ObjCObjectPointerType>(); in findMethodDecl()
748 const auto *ParamObjectPtrType = ParamType->getAs<ObjCObjectPointerType>(); in checkPreObjCMessage()
[all …]
DCStringChecker.cpp222 Optional<DefinedSVal> val = V.getAs<DefinedSVal>(); in REGISTER_MAP_WITH_PROGRAMSTATE()
382 Optional<NonLoc> Length = LengthVal.getAs<NonLoc>(); in CheckBufferAccess()
393 if (Optional<Loc> BufLoc = BufStart.getAs<Loc>()) { in CheckBufferAccess()
413 if (Optional<Loc> BufLoc = BufStart.getAs<Loc>()) { in CheckBufferAccess()
449 Optional<Loc> firstLoc = firstVal.getAs<Loc>(); in CheckOverlap()
453 Optional<Loc> secondLoc = secondVal.getAs<Loc>(); in CheckOverlap()
477 reverse.getAs<DefinedOrUnknownSVal>(); in CheckOverlap()
497 Optional<NonLoc> Length = LengthVal.getAs<NonLoc>(); in CheckOverlap()
507 Optional<Loc> FirstStartLoc = FirstStart.getAs<Loc>(); in CheckOverlap()
514 Optional<Loc> FirstEndLoc = FirstEnd.getAs<Loc>(); in CheckOverlap()
[all …]
/external/clang/lib/Index/
DUSRGeneration.cpp567 if (const PackExpansionType *Expansion = T->getAs<PackExpansionType>()) { in VisitType()
572 if (const BuiltinType *BT = T->getAs<BuiltinType>()) { in VisitType()
664 if (const PointerType *PT = T->getAs<PointerType>()) { in VisitType()
669 if (const ObjCObjectPointerType *OPT = T->getAs<ObjCObjectPointerType>()) { in VisitType()
674 if (const RValueReferenceType *RT = T->getAs<RValueReferenceType>()) { in VisitType()
679 if (const ReferenceType *RT = T->getAs<ReferenceType>()) { in VisitType()
684 if (const FunctionProtoType *FT = T->getAs<FunctionProtoType>()) { in VisitType()
693 if (const BlockPointerType *BT = T->getAs<BlockPointerType>()) { in VisitType()
698 if (const ComplexType *CT = T->getAs<ComplexType>()) { in VisitType()
703 if (const TagType *TT = T->getAs<TagType>()) { in VisitType()
[all …]
/external/clang/lib/Analysis/
DFormatString.cpp294 const PointerType *PT = argTy->getAs<PointerType>(); in matchesType()
313 if (const EnumType *ETy = argTy->getAs<EnumType>()) in matchesType()
316 if (const BuiltinType *BT = argTy->getAs<BuiltinType>()) in matchesType()
330 if (const EnumType *ETy = argTy->getAs<EnumType>()) in matchesType()
337 if (const BuiltinType *BT = argTy->getAs<BuiltinType>()) in matchesType()
368 const PointerType *PT = argTy->getAs<PointerType>(); in matchesType()
372 if (const BuiltinType *BT = pointeeTy->getAs<BuiltinType>()) in matchesType()
388 const PointerType *PT = argTy->getAs<PointerType>(); in matchesType()
425 if (argTy->getAs<ObjCObjectPointerType>() || in matchesType()
426 argTy->getAs<BlockPointerType>()) in matchesType()
[all …]
DCocoaConventions.cpp28 while (const TypedefType *TD = RetTy->getAs<TypedefType>()) { in isRefType()
42 const PointerType* PT = RetTy->getAs<PointerType>(); in isRefType()
63 const ObjCObjectPointerType *PT = Ty->getAs<ObjCObjectPointerType>(); in isCocoaObjectRef()
/external/clang/test/CodeCompletion/
Dfunction-templates.cpp11 template<typename T> T &getAs();
16 Foo().getAs<int>();
/external/clang/lib/CodeGen/
DCodeGenTypes.cpp135 if (!isSafeToConvert(I.getType()->getAs<RecordType>()->getDecl(), in isSafeToConvert()
157 if (const auto *AT = T->getAs<AtomicType>()) in isSafeToConvert()
161 if (const auto *RT = T->getAs<RecordType>()) in isSafeToConvert()
194 if (const auto *MPT = Ty->getAs<MemberPointerType>()) in isFuncParamTypeConvertible()
198 const TagType *TT = Ty->getAs<TagType>(); in isFuncParamTypeConvertible()
321 if (const RecordType *RT = FT->getReturnType()->getAs<RecordType>()) in ConvertFunctionType()
325 if (const RecordType *RT = FPT->getParamType(i)->getAs<RecordType>()) in ConvertFunctionType()
694 ConvertRecordDeclType(I.getType()->getAs<RecordType>()->getDecl()); in ConvertRecordDeclType()
755 if (const RecordType *RT = T->getAs<RecordType>()) { in isZeroInitializable()
761 if (const MemberPointerType *MPT = T->getAs<MemberPointerType>()) in isZeroInitializable()

123456789