Home
last modified time | relevance | path

Searched refs:getAs (Results 1 – 25 of 185) 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()
69 if (Optional<nonloc::LocAsInteger> X = getAs<nonloc::LocAsInteger>()) in getAsLocSymbol()
72 if (Optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>()) { in getAsLocSymbol()
82 Optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>(); in getLocSymbolInBase()
105 if (Optional<nonloc::SymbolVal> X = getAs<nonloc::SymbolVal>()) in getAsSymbol()
114 if (Optional<nonloc::SymbolVal> X = getAs<nonloc::SymbolVal>()) in getAsSymbolicExpression()
128 if (Optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>()) in getAsRegion()
[all …]
DBugReporterVisitors.cpp182 while (Node && Node->getLocation().getAs<PostStmt>()) in addVisitorIfNecessary()
202 if (Optional<Loc> LValue = RetVal.getAs<Loc>()) in addVisitorIfNecessary()
212 if (Optional<Loc> RetLoc = RetVal.getAs<Loc>()) in addVisitorIfNecessary()
257 if ((LValue = V.getAs<Loc>())) { in visitNodeInitial()
259 if (RValue.getAs<DefinedSVal>()) in visitNodeInitial()
265 if (V.getAs<nonloc::LazyCompoundVal>() || in visitNodeInitial()
266 V.getAs<nonloc::CompoundVal>()) in visitNodeInitial()
286 if (V.getAs<Loc>()) { in visitNodeInitial()
351 Optional<Loc> ArgV = Call->getArgSVal(I).getAs<Loc>(); in visitNodeMaybeUnsuppress()
487 if (V.isUndef() || V.getAs<loc::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()
143 if (!val.getAs<loc::ConcreteInt>()) in evalCastFromLoc()
609 if (Optional<loc::ConcreteInt> rInt = rhs.getAs<loc::ConcreteInt>()) { in evalBinOpLL()
612 if (Optional<Loc> Result = ResultVal.getAs<Loc>()) in evalBinOpLL()
622 assert(rhs.getAs<loc::MemRegionVal>() || rhs.getAs<loc::GotoLabel>()); in evalBinOpLL()
643 if (Optional<loc::ConcreteInt> rInt = rhs.getAs<loc::ConcreteInt>()) { in evalBinOpLL()
741 Optional<NonLoc> LeftIndex = LeftIndexVal.getAs<NonLoc>(); in evalBinOpLL()
[all …]
DStore.cpp53 if (const RecordType *RT = Ty->getAs<RecordType>()) { in IsCompleteType()
276 Derived.getAs<loc::MemRegionVal>(); in evalDerivedToBase()
296 Optional<loc::MemRegionVal> BaseRegVal = Base.getAs<loc::MemRegionVal>(); in evalDynamicCast()
366 if (const ReferenceType *RT = T->getAs<ReferenceType>()) in CastRetrievedVal()
422 if (Base.isUnknownOrUndef() || Base.getAs<loc::ConcreteInt>()) in getLValueElement()
449 if (!BaseIdx.getAs<nonloc::ConcreteInt>()) in getLValueElement()
458 if (!Offset.getAs<nonloc::ConcreteInt>()) { in getLValueElement()
DExprEngine.cpp122 Constraint_untested.getAs<DefinedOrUnknownSVal>(); in getInitialState()
141 if (Optional<Loc> LV = V.getAs<Loc>()) { in getInitialState()
157 if (Optional<Loc> LV = V.getAs<Loc>()) { in getInitialState()
174 if (!Result && !V.getAs<NonLoc>()) in createTemporaryRegionIfNeeded()
185 if (V.getAs<NonLoc>()) { in createTemporaryRegionIfNeeded()
279 if (Pred->getLocation().getAs<BlockEntrance>()) in shouldRemoveDeadBindings()
496 if (const ReferenceType *refType = varType->getAs<ReferenceType>()) in ProcessAutomaticObjDtor()
1089 if (L.getAs<PreImplicitCall>()) in replayWithoutInlining()
1091 if (L.getAs<CallEnter>()) in replayWithoutInlining()
1093 if (Optional<StmtPoint> SP = L.getAs<StmtPoint>()) in replayWithoutInlining()
[all …]
DCoreEngine.cpp117 if (U.getNode()->getLocation().getAs<BlockEntrance>()) in enqueue()
262 assert(Loc.getAs<PostStmt>() || in dispatchWorkItem()
263 Loc.getAs<PostInitializer>() || in dispatchWorkItem()
264 Loc.getAs<PostImplicitCall>() || in dispatchWorkItem()
265 Loc.getAs<CallExitEnd>()); in dispatchWorkItem()
498 if (N->getLocation().getAs<CallEnter>()) { in enqueueStmtNode()
506 if (N->getLocation().getAs<PostInitializer>() || in enqueueStmtNode()
507 N->getLocation().getAs<PostImplicitCall>()) { in enqueueStmtNode()
512 if (N->getLocation().getAs<EpsilonPoint>()) { in enqueueStmtNode()
DSValBuilder.cpp81 if (Optional<nonloc::ConcreteInt> CI = val.getAs<nonloc::ConcreteInt>()) { in convertToArrayIndex()
240 if (Optional<nonloc::ConcreteInt> rInt = RHS.getAs<nonloc::ConcreteInt>()) in makeSymExprValNN()
244 if (Optional<nonloc::ConcreteInt> lInt = LHS.getAs<nonloc::ConcreteInt>()) in makeSymExprValNN()
260 if (Optional<Loc> LV = lhs.getAs<Loc>()) { in evalBinOp()
261 if (Optional<Loc> RV = rhs.getAs<Loc>()) in evalBinOp()
267 if (Optional<Loc> RV = rhs.getAs<Loc>()) { in evalBinOp()
335 if (Optional<nonloc::LocAsInteger> LV = val.getAs<nonloc::LocAsInteger>()) { in evalCast()
DRegionStore.cpp764 Extent.getAs<nonloc::ConcreteInt>()) { in collectSubRegionBindings()
907 V.getAs<nonloc::LazyCompoundVal>()) { in VisitBinding()
951 if (Optional<Loc> L = V.getAs<Loc>()) { in VisitBaseRegion()
1124 if (!Array.getAs<loc::MemRegionVal>()) in ArrayToPointer()
1147 assert(!L.getAs<UnknownVal>() && "location unknown"); in getBinding()
1148 assert(!L.getAs<UndefinedVal>() && "location undefined"); in getBinding()
1156 if (L.getAs<loc::ConcreteInt>()) { in getBinding()
1159 if (!L.getAs<loc::MemRegionVal>()) { in getBinding()
1282 Optional<nonloc::LazyCompoundVal> LCV = V->getAs<nonloc::LazyCompoundVal>(); in getExistingLazyBinding()
1374 if (Optional<nonloc::ConcreteInt> CI = Idx.getAs<nonloc::ConcreteInt>()) { in getBindingForElement()
[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()
58 if (const PointerType *PT = T->getAs<PointerType>()) { in CheckSpecifiedExceptionType()
66 } else if (const ReferenceType *RT = T->getAs<ReferenceType>()) { in CheckSpecifiedExceptionType()
87 PointeeT->getAs<RecordType>()->isBeingDefined()) && in CheckSpecifiedExceptionType()
99 if (const PointerType *PT = T->getAs<PointerType>()) in CheckDistantExceptionSpec()
101 else if (const MemberPointerType *PT = T->getAs<MemberPointerType>()) in CheckDistantExceptionSpec()
106 const FunctionProtoType *FnT = T->getAs<FunctionProtoType>(); in CheckDistantExceptionSpec()
[all …]
DSemaCast.cpp405 const PointerType *T1PtrType = T1->getAs<PointerType>(), in UnwrapDissimilarPointerTypes()
406 *T2PtrType = T2->getAs<PointerType>(); in UnwrapDissimilarPointerTypes()
413 T1->getAs<ObjCObjectPointerType>(), in UnwrapDissimilarPointerTypes()
415 T2->getAs<ObjCObjectPointerType>(); in UnwrapDissimilarPointerTypes()
436 const MemberPointerType *T1MPType = T1->getAs<MemberPointerType>(), in UnwrapDissimilarPointerTypes()
437 *T2MPType = T2->getAs<MemberPointerType>(); in UnwrapDissimilarPointerTypes()
444 const BlockPointerType *T1BPType = T1->getAs<BlockPointerType>(), in UnwrapDissimilarPointerTypes()
445 *T2BPType = T2->getAs<BlockPointerType>(); in UnwrapDissimilarPointerTypes()
551 const PointerType *DestPointer = DestType->getAs<PointerType>(); in CheckDynamicCast()
555 } else if ((DestReference = DestType->getAs<ReferenceType>())) { in CheckDynamicCast()
[all …]
DSemaOverload.cpp261 if (const PointerType* ToPtrType = ToType->getAs<PointerType>()) in isPointerConversionToVoidPointer()
1236 if (ToType->getAs<RecordType>() && FromType->getAs<RecordType>() && in TryImplicitConversion()
1326 CanTo = CanTo.getAs<PointerType>()->getPointeeType(); in IsNoReturnConversion()
1327 CanFrom = CanFrom.getAs<PointerType>()->getPointeeType(); in IsNoReturnConversion()
1329 CanTo = CanTo.getAs<BlockPointerType>()->getPointeeType(); in IsNoReturnConversion()
1330 CanFrom = CanFrom.getAs<BlockPointerType>()->getPointeeType(); in IsNoReturnConversion()
1332 CanTo = CanTo.getAs<MemberPointerType>()->getPointeeType(); in IsNoReturnConversion()
1333 CanFrom = CanFrom.getAs<MemberPointerType>()->getPointeeType(); in IsNoReturnConversion()
1505 if (const AtomicType *Atomic = FromType->getAs<AtomicType>()) in IsStandardConversion()
1723 const BuiltinType *To = ToType->getAs<BuiltinType>(); in IsIntegralPromotion()
[all …]
/external/clang/lib/StaticAnalyzer/Checkers/
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()
223 if (const RecordType *RT = Ty->getAs<RecordType>()) { in IsCompleteType()
237 return val.getAs<UndefinedVal>() ? svalBuilder.makeArrayIndex(0) : val; in getValue()
286 if (!index.getAs<NonLoc>()) in computeOffset()
DNSErrorChecker.cpp189 if (Optional<loc::MemRegionVal> X = val.getAs<loc::MemRegionVal>()) { in parameterTypeFromSVal()
191 if (const VarRegion *VR = R->getAs<VarRegion>()) in parameterTypeFromSVal()
206 if (loc.isUndef() || !loc.getAs<Loc>()) in checkLocation()
277 const PointerType* PPT = T->getAs<PointerType>(); in IsNSError()
282 PPT->getPointeeType()->getAs<ObjCObjectPointerType>(); in IsNSError()
297 const PointerType* PPT = T->getAs<PointerType>(); in IsCFError()
300 const TypedefType* TT = PPT->getPointeeType()->getAs<TypedefType>(); in IsCFError()
DNonNullParamChecker.cpp76 Optional<DefinedSVal> DV = V.getAs<DefinedSVal>(); in checkPreCall()
81 assert(!haveRefTypeParam || DV->getAs<Loc>()); in checkPreCall()
83 if (haveAttrNonNull && !DV->getAs<Loc>()) { in checkPreCall()
95 DV->getAs<nonloc::CompoundVal>()) { in checkPreCall()
99 DV = V.getAs<DefinedSVal>(); in checkPreCall()
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()
204 if (const RecordType *baseT = T->getAs<RecordType>()) { in IsPartOfAST()
247 if (const RecordType *RT = T->getAs<RecordType>()) { in Visit()
DCStringChecker.cpp204 Optional<DefinedSVal> val = V.getAs<DefinedSVal>(); in REGISTER_MAP_WITH_PROGRAMSTATE()
362 Optional<NonLoc> Length = LengthVal.getAs<NonLoc>(); in CheckBufferAccess()
373 if (Optional<Loc> BufLoc = BufStart.getAs<Loc>()) { in CheckBufferAccess()
393 if (Optional<Loc> BufLoc = BufStart.getAs<Loc>()) { in CheckBufferAccess()
429 Optional<Loc> firstLoc = firstVal.getAs<Loc>(); in CheckOverlap()
433 Optional<Loc> secondLoc = secondVal.getAs<Loc>(); in CheckOverlap()
457 reverse.getAs<DefinedOrUnknownSVal>(); in CheckOverlap()
477 Optional<NonLoc> Length = LengthVal.getAs<NonLoc>(); in CheckOverlap()
487 Optional<Loc> FirstStartLoc = FirstStart.getAs<Loc>(); in CheckOverlap()
494 Optional<Loc> FirstEndLoc = FirstEnd.getAs<Loc>(); in CheckOverlap()
[all …]
DDynamicTypePropagation.cpp198 = MsgE->getClassReceiver()->getAs<ObjCObjectType>()) in getObjectTypeForAllocAndNew()
204 = MsgE->getSuperType()->getAs<ObjCObjectType>()) in getObjectTypeForAllocAndNew()
238 CastE->getType()->getAs<ObjCObjectPointerType>(); in getBetterObjCType()
246 OldDTy->getAs<ObjCObjectPointerType>(); in getBetterObjCType()
/external/clang/lib/AST/
DType.cpp52 ND = ty->getAs<RecordType>()->getDecl(); in getBaseTypeIdentifier()
54 ND = ty->getAs<EnumType>()->getDecl(); in getBaseTypeIdentifier()
56 ND = ty->getAs<TypedefType>()->getDecl(); in getBaseTypeIdentifier()
306 while (const ParenType *PT = T->getAs<ParenType>()) in IgnoreParens()
332 template <> const TypedefType *Type::getAs() const { in getAs() function in Type
336 template <> const TemplateSpecializationType *Type::getAs() const { in getAs() function in Type
378 if (const RecordType *RT = getAs<RecordType>()) in isClassType()
383 if (const RecordType *RT = getAs<RecordType>()) in isStructureType()
388 if (const RecordType *RT = getAs<RecordType>()) in isInterfaceType()
393 if (const RecordType *RT = getAs<RecordType>()) in isStructureOrClassType()
[all …]
DComment.cpp244 if (QualifiedTypeLoc QualifiedTL = TL.getAs<QualifiedTypeLoc>()) { in fill()
249 if (PointerTypeLoc PointerTL = TL.getAs<PointerTypeLoc>()) { in fill()
254 TL.getAs<BlockPointerTypeLoc>()) { in fill()
259 TL.getAs<MemberPointerTypeLoc>()) { in fill()
264 if (FunctionTypeLoc FTL = TL.getAs<FunctionTypeLoc>()) { in fill()
/external/llvm/utils/yaml2obj/
Dyaml2obj.cpp42 getAs(const llvm::yaml::ScalarNode *SN, T &Result) { in getAs() function
151 if (!getAs(Value, Machine)) { in parseHeader()
205 if (!getAs(Value, Header.NumberOfSections)) { in parseHeader()
210 if (!getAs(Value, Header.TimeDateStamp)) { in parseHeader()
215 if (!getAs(Value, Header.PointerToSymbolTable)) { in parseHeader()
220 if (!getAs(Value, Header.NumberOfSymbols)) { in parseHeader()
225 if (!getAs(Value, Header.SizeOfOptionalHeader)) { in parseHeader()
248 if (!getAs(Value, Header.Characteristics)) { in parseHeaderCharacteristics()
349 if (!getAs(Value, Sec.Header.VirtualSize)) { in parseSections()
354 if (!getAs(Value, Sec.Header.VirtualAddress)) { in parseSections()
[all …]
/external/clang/lib/Analysis/
DFormatString.cpp239 const PointerType *PT = argTy->getAs<PointerType>(); in matchesType()
258 if (const EnumType *ETy = argTy->getAs<EnumType>()) in matchesType()
261 if (const BuiltinType *BT = argTy->getAs<BuiltinType>()) in matchesType()
275 if (const EnumType *ETy = argTy->getAs<EnumType>()) in matchesType()
282 if (const BuiltinType *BT = argTy->getAs<BuiltinType>()) in matchesType()
312 const PointerType *PT = argTy->getAs<PointerType>(); in matchesType()
316 if (const BuiltinType *BT = pointeeTy->getAs<BuiltinType>()) in matchesType()
332 const PointerType *PT = argTy->getAs<PointerType>(); in matchesType()
363 if (argTy->getAs<ObjCObjectPointerType>() || in matchesType()
364 argTy->getAs<BlockPointerType>()) in matchesType()
[all …]
/external/clang/test/CodeCompletion/
Dfunction-templates.cpp11 template<typename T> T &getAs();
16 Foo().getAs<int>();
/external/clang/lib/CodeGen/
DTargetInfo.cpp131 const RecordType *RT = FT->getAs<RecordType>(); in isEmptyField()
149 const RecordType *RT = T->getAs<RecordType>(); in isEmptyRecord()
184 const RecordType *RT = T->getAs<RecordType>(); in isRecordWithNonTrivialDestructorOrCopyConstructor()
271 if (const ComplexType *CTy = Ty->getAs<ComplexType>()) in is32Or64BitBasicType()
277 if (!Ty->getAs<BuiltinType>() && !Ty->hasPointerRepresentation() && in is32Or64BitBasicType()
296 const RecordType *RT = Ty->getAs<RecordType>(); in canExpandIndirectArgument()
377 if (const EnumType *EnumTy = Ty->getAs<EnumType>()) in classifyArgumentType()
392 if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) in classifyReturnType()
449 if (const EnumType *EnumTy = Ty->getAs<EnumType>()) in classifyArgumentType()
476 if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) in classifyReturnType()
[all …]
/external/clang/tools/libclang/
DCIndexUSRs.cpp533 if (const PackExpansionType *Expansion = T->getAs<PackExpansionType>()) { in VisitType()
538 if (const BuiltinType *BT = T->getAs<BuiltinType>()) { in VisitType()
626 if (const PointerType *PT = T->getAs<PointerType>()) { in VisitType()
631 if (const ReferenceType *RT = T->getAs<ReferenceType>()) { in VisitType()
636 if (const FunctionProtoType *FT = T->getAs<FunctionProtoType>()) { in VisitType()
647 if (const BlockPointerType *BT = T->getAs<BlockPointerType>()) { in VisitType()
652 if (const ComplexType *CT = T->getAs<ComplexType>()) { in VisitType()
657 if (const TagType *TT = T->getAs<TagType>()) { in VisitType()
662 if (const TemplateTypeParmType *TTP = T->getAs<TemplateTypeParmType>()) { in VisitType()
667 = T->getAs<TemplateSpecializationType>()) { in VisitType()

12345678