Home
last modified time | relevance | path

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

12345678

/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 FunctionTextRegion *CTR = R->getAs<FunctionTextRegion>()) 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 …]
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 …]
DBugReporterVisitors.cpp186 while (Node && Node->getLocation().getAs<PostStmt>()) in addVisitorIfNecessary()
206 if (Optional<Loc> LValue = RetVal.getAs<Loc>()) in addVisitorIfNecessary()
216 if (Optional<Loc> RetLoc = RetVal.getAs<Loc>()) in addVisitorIfNecessary()
262 if ((LValue = V.getAs<Loc>())) { in visitNodeInitial()
264 if (RValue.getAs<DefinedSVal>()) in visitNodeInitial()
270 if (V.getAs<nonloc::LazyCompoundVal>() || in visitNodeInitial()
271 V.getAs<nonloc::CompoundVal>()) in visitNodeInitial()
293 if (V.getAs<Loc>()) { in visitNodeInitial()
358 Optional<Loc> ArgV = Call->getArgSVal(I).getAs<Loc>(); in visitNodeMaybeUnsuppress()
532 V.getAs<loc::ConcreteInt>() || V.getAs<nonloc::ConcreteInt>()) { in VisitNode()
[all …]
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()
DRegionStore.cpp813 Extent.getAs<nonloc::ConcreteInt>()) { in collectSubRegionBindings()
985 V.getAs<nonloc::LazyCompoundVal>()) { in VisitBinding()
1032 if (Optional<Loc> L = V.getAs<Loc>()) { in VisitCluster()
1218 V.getAs<nonloc::LazyCompoundVal>()) { in populateWorkList()
1337 if (!Array.getAs<loc::MemRegionVal>()) in ArrayToPointer()
1350 assert(!L.getAs<UnknownVal>() && "location unknown"); in getBinding()
1351 assert(!L.getAs<UndefinedVal>() && "location undefined"); in getBinding()
1359 if (L.getAs<loc::ConcreteInt>()) { in getBinding()
1362 if (!L.getAs<loc::MemRegionVal>()) { in getBinding()
1500 Optional<nonloc::LazyCompoundVal> LCV = V->getAs<nonloc::LazyCompoundVal>(); in getExistingLazyBinding()
[all …]
/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()
114 PointeeT->getAs<RecordType>()->isBeingDefined()) && in CheckSpecifiedExceptionType()
126 if (const PointerType *PT = T->getAs<PointerType>()) in CheckDistantExceptionSpec()
128 else if (const MemberPointerType *PT = T->getAs<MemberPointerType>()) in CheckDistantExceptionSpec()
133 const FunctionProtoType *FnT = T->getAs<FunctionProtoType>(); in CheckDistantExceptionSpec()
[all …]
DSemaCast.cpp396 if (auto Ptr = From->getAs<PointerType>()) { in diagnoseBadCast()
401 if (auto Ptr = To->getAs<PointerType>()) { in diagnoseBadCast()
406 auto RecFrom = From->getAs<RecordType>(); in diagnoseBadCast()
407 auto RecTo = To->getAs<RecordType>(); in diagnoseBadCast()
427 const PointerType *T1PtrType = T1->getAs<PointerType>(), in UnwrapDissimilarPointerTypes()
428 *T2PtrType = T2->getAs<PointerType>(); in UnwrapDissimilarPointerTypes()
435 T1->getAs<ObjCObjectPointerType>(), in UnwrapDissimilarPointerTypes()
437 T2->getAs<ObjCObjectPointerType>(); in UnwrapDissimilarPointerTypes()
458 const MemberPointerType *T1MPType = T1->getAs<MemberPointerType>(), in UnwrapDissimilarPointerTypes()
459 *T2MPType = T2->getAs<MemberPointerType>(); in UnwrapDissimilarPointerTypes()
[all …]
DSemaOverload.cpp246 if (const PointerType* ToPtrType = ToType->getAs<PointerType>()) in isPointerConversionToVoidPointer()
1256 if (ToType->getAs<RecordType>() && FromType->getAs<RecordType>() && in TryImplicitConversion()
1351 CanTo = CanTo.getAs<PointerType>()->getPointeeType(); in IsNoReturnConversion()
1352 CanFrom = CanFrom.getAs<PointerType>()->getPointeeType(); in IsNoReturnConversion()
1354 CanTo = CanTo.getAs<BlockPointerType>()->getPointeeType(); in IsNoReturnConversion()
1355 CanFrom = CanFrom.getAs<BlockPointerType>()->getPointeeType(); in IsNoReturnConversion()
1357 CanTo = CanTo.getAs<MemberPointerType>()->getPointeeType(); in IsNoReturnConversion()
1358 CanFrom = CanFrom.getAs<MemberPointerType>()->getPointeeType(); in IsNoReturnConversion()
1526 if (const AtomicType *Atomic = FromType->getAs<AtomicType>()) in IsStandardConversion()
1764 const BuiltinType *To = ToType->getAs<BuiltinType>(); in IsIntegralPromotion()
[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/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()
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()
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()
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()
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()
391 To->getObjectType()->getSuperClassType()->getAs<ObjCObjectType>(); in getMostInformativeDerivedClassImpl()
395 const auto *SuperPtrOfTo = SuperPtrOfToQual->getAs<ObjCObjectPointerType>(); in getMostInformativeDerivedClassImpl()
505 const auto *OrigObjectPtrType = OriginType->getAs<ObjCObjectPointerType>(); in checkPostStmt()
506 const auto *DestObjectPtrType = DestType->getAs<ObjCObjectPointerType>(); in checkPostStmt()
632 ReceiverType->getAs<ObjCObjectPointerType>(); in findMethodDecl()
723 const auto *ParamObjectPtrType = ParamType->getAs<ObjCObjectPointerType>(); in checkPreObjCMessage()
[all …]
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 …]
DCStringChecker.cpp218 Optional<DefinedSVal> val = V.getAs<DefinedSVal>(); in REGISTER_MAP_WITH_PROGRAMSTATE()
378 Optional<NonLoc> Length = LengthVal.getAs<NonLoc>(); in CheckBufferAccess()
389 if (Optional<Loc> BufLoc = BufStart.getAs<Loc>()) { in CheckBufferAccess()
409 if (Optional<Loc> BufLoc = BufStart.getAs<Loc>()) { in CheckBufferAccess()
445 Optional<Loc> firstLoc = firstVal.getAs<Loc>(); in CheckOverlap()
449 Optional<Loc> secondLoc = secondVal.getAs<Loc>(); in CheckOverlap()
473 reverse.getAs<DefinedOrUnknownSVal>(); in CheckOverlap()
493 Optional<NonLoc> Length = LengthVal.getAs<NonLoc>(); in CheckOverlap()
503 Optional<Loc> FirstStartLoc = FirstStart.getAs<Loc>(); in CheckOverlap()
510 Optional<Loc> FirstEndLoc = FirstEnd.getAs<Loc>(); in CheckOverlap()
[all …]
DNullabilityChecker.cpp264 auto RegionSVal = Val.getAs<loc::MemRegionVal>(); in getTrackRegion()
271 if (auto FieldReg = Region->getAs<FieldRegion>()) in getTrackRegion()
273 if (auto ElementReg = Region->getAs<ElementRegion>()) in getTrackRegion()
300 if (Optional<StmtPoint> SP = ProgLoc.getAs<StmtPoint>()) { in VisitNode()
320 const auto *AttrType = Type->getAs<AttributedType>(); in getNullabilityAnnotation()
343 .template getAs<loc::MemRegionVal>(); in checkParamsForPreconditionViolation()
348 .template getAs<DefinedOrUnknownSVal>(); in checkParamsForPreconditionViolation()
417 const auto *Region = I->first->getAs<SymbolicRegion>(); in checkDeadSymbols()
483 State->getSVal(S, C.getLocationContext()).getAs<DefinedOrUnknownSVal>(); in checkPreStmt()
557 auto ArgSVal = Call.getArgSVal(Idx++).getAs<DefinedOrUnknownSVal>(); in checkPreCall()
[all …]
/external/clang/lib/Index/
DUSRGeneration.cpp548 if (const PackExpansionType *Expansion = T->getAs<PackExpansionType>()) { in VisitType()
553 if (const BuiltinType *BT = T->getAs<BuiltinType>()) { in VisitType()
652 if (const PointerType *PT = T->getAs<PointerType>()) { in VisitType()
657 if (const RValueReferenceType *RT = T->getAs<RValueReferenceType>()) { in VisitType()
662 if (const ReferenceType *RT = T->getAs<ReferenceType>()) { in VisitType()
667 if (const FunctionProtoType *FT = T->getAs<FunctionProtoType>()) { in VisitType()
676 if (const BlockPointerType *BT = T->getAs<BlockPointerType>()) { in VisitType()
681 if (const ComplexType *CT = T->getAs<ComplexType>()) { in VisitType()
686 if (const TagType *TT = T->getAs<TagType>()) { in VisitType()
691 if (const TemplateTypeParmType *TTP = T->getAs<TemplateTypeParmType>()) { in VisitType()
[all …]
/external/clang/lib/Analysis/
DFormatString.cpp263 const PointerType *PT = argTy->getAs<PointerType>(); in matchesType()
282 if (const EnumType *ETy = argTy->getAs<EnumType>()) in matchesType()
285 if (const BuiltinType *BT = argTy->getAs<BuiltinType>()) in matchesType()
299 if (const EnumType *ETy = argTy->getAs<EnumType>()) in matchesType()
306 if (const BuiltinType *BT = argTy->getAs<BuiltinType>()) in matchesType()
337 const PointerType *PT = argTy->getAs<PointerType>(); in matchesType()
341 if (const BuiltinType *BT = pointeeTy->getAs<BuiltinType>()) in matchesType()
357 const PointerType *PT = argTy->getAs<PointerType>(); in matchesType()
394 if (argTy->getAs<ObjCObjectPointerType>() || in matchesType()
395 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()
310 if (const RecordType *RT = FT->getReturnType()->getAs<RecordType>()) in ConvertFunctionType()
314 if (const RecordType *RT = FPT->getParamType(i)->getAs<RecordType>()) in ConvertFunctionType()
684 ConvertRecordDeclType(I.getType()->getAs<RecordType>()->getDecl()); in ConvertRecordDeclType()
745 if (const RecordType *RT = T->getAs<RecordType>()) { in isZeroInitializable()
751 if (const MemberPointerType *MPT = T->getAs<MemberPointerType>()) in isZeroInitializable()

12345678