Home
last modified time | relevance | path

Searched refs:getAs (Results 1 – 25 of 187) 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()
143 if (!val.getAs<loc::ConcreteInt>()) in evalCastFromLoc()
633 if (Optional<loc::ConcreteInt> rInt = rhs.getAs<loc::ConcreteInt>()) { in evalBinOpLL()
636 if (Optional<NonLoc> Result = ResultVal.getAs<NonLoc>()) in evalBinOpLL()
639 assert(!ResultVal.getAs<Loc>() && "Loc-Loc ops should not produce Locs"); in evalBinOpLL()
647 assert(rhs.getAs<loc::MemRegionVal>() || rhs.getAs<loc::GotoLabel>()); in evalBinOpLL()
668 if (Optional<loc::ConcreteInt> rInt = rhs.getAs<loc::ConcreteInt>()) { in evalBinOpLL()
[all …]
DBugReporterVisitors.cpp191 while (Node && Node->getLocation().getAs<PostStmt>()) in addVisitorIfNecessary()
211 if (Optional<Loc> LValue = RetVal.getAs<Loc>()) in addVisitorIfNecessary()
221 if (Optional<Loc> RetLoc = RetVal.getAs<Loc>()) in addVisitorIfNecessary()
266 if ((LValue = V.getAs<Loc>())) { in visitNodeInitial()
268 if (RValue.getAs<DefinedSVal>()) in visitNodeInitial()
274 if (V.getAs<nonloc::LazyCompoundVal>() || in visitNodeInitial()
275 V.getAs<nonloc::CompoundVal>()) in visitNodeInitial()
297 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 …]
DSValBuilder.cpp81 if (Optional<nonloc::ConcreteInt> CI = val.getAs<nonloc::ConcreteInt>()) { in convertToArrayIndex()
320 if (Optional<nonloc::ConcreteInt> rInt = RHS.getAs<nonloc::ConcreteInt>()) in makeSymExprValNN()
324 if (Optional<nonloc::ConcreteInt> lInt = LHS.getAs<nonloc::ConcreteInt>()) in makeSymExprValNN()
340 if (Optional<Loc> LV = lhs.getAs<Loc>()) { in evalBinOp()
341 if (Optional<Loc> RV = rhs.getAs<Loc>()) in evalBinOp()
347 if (Optional<Loc> RV = rhs.getAs<Loc>()) { in evalBinOp()
415 assert(val.getAs<Loc>() || val.getAs<nonloc::LocAsInteger>()); in evalCast()
431 if (Optional<nonloc::LocAsInteger> LV = val.getAs<nonloc::LocAsInteger>()) { in evalCast()
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()
516 if (N->getLocation().getAs<CallEnter>()) { in enqueueStmtNode()
524 if (N->getLocation().getAs<PostInitializer>() || in enqueueStmtNode()
525 N->getLocation().getAs<PostImplicitCall>()) { in enqueueStmtNode()
530 if (N->getLocation().getAs<EpsilonPoint>()) { in enqueueStmtNode()
DRegionStore.cpp826 Extent.getAs<nonloc::ConcreteInt>()) { in collectSubRegionBindings()
980 V.getAs<nonloc::LazyCompoundVal>()) { in VisitBinding()
1023 if (Optional<Loc> L = V.getAs<Loc>()) { in VisitCluster()
1130 V.getAs<nonloc::LazyCompoundVal>()) { in populateWorkList()
1254 if (!Array.getAs<loc::MemRegionVal>()) in ArrayToPointer()
1267 assert(!L.getAs<UnknownVal>() && "location unknown"); in getBinding()
1268 assert(!L.getAs<UndefinedVal>() && "location undefined"); in getBinding()
1276 if (L.getAs<loc::ConcreteInt>()) { in getBinding()
1279 if (!L.getAs<loc::MemRegionVal>()) { in getBinding()
1413 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()
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.cpp402 const PointerType *T1PtrType = T1->getAs<PointerType>(), in UnwrapDissimilarPointerTypes()
403 *T2PtrType = T2->getAs<PointerType>(); in UnwrapDissimilarPointerTypes()
410 T1->getAs<ObjCObjectPointerType>(), in UnwrapDissimilarPointerTypes()
412 T2->getAs<ObjCObjectPointerType>(); in UnwrapDissimilarPointerTypes()
433 const MemberPointerType *T1MPType = T1->getAs<MemberPointerType>(), in UnwrapDissimilarPointerTypes()
434 *T2MPType = T2->getAs<MemberPointerType>(); in UnwrapDissimilarPointerTypes()
441 const BlockPointerType *T1BPType = T1->getAs<BlockPointerType>(), in UnwrapDissimilarPointerTypes()
442 *T2BPType = T2->getAs<BlockPointerType>(); in UnwrapDissimilarPointerTypes()
548 const PointerType *DestPointer = DestType->getAs<PointerType>(); in CheckDynamicCast()
552 } else if ((DestReference = DestType->getAs<ReferenceType>())) { in CheckDynamicCast()
[all …]
DSemaOverload.cpp270 if (const PointerType* ToPtrType = ToType->getAs<PointerType>()) in isPointerConversionToVoidPointer()
1222 if (ToType->getAs<RecordType>() && FromType->getAs<RecordType>() && in TryImplicitConversion()
1312 CanTo = CanTo.getAs<PointerType>()->getPointeeType(); in IsNoReturnConversion()
1313 CanFrom = CanFrom.getAs<PointerType>()->getPointeeType(); in IsNoReturnConversion()
1315 CanTo = CanTo.getAs<BlockPointerType>()->getPointeeType(); in IsNoReturnConversion()
1316 CanFrom = CanFrom.getAs<BlockPointerType>()->getPointeeType(); in IsNoReturnConversion()
1318 CanTo = CanTo.getAs<MemberPointerType>()->getPointeeType(); in IsNoReturnConversion()
1319 CanFrom = CanFrom.getAs<MemberPointerType>()->getPointeeType(); in IsNoReturnConversion()
1491 if (const AtomicType *Atomic = FromType->getAs<AtomicType>()) in IsStandardConversion()
1709 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()
DCheckSecuritySyntaxOnly.cpp300 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_gets()
309 const PointerType *PT = FPT->getArgType(0)->getAs<PointerType>(); in checkCall_gets()
337 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_getpw()
350 const PointerType *PT = FPT->getArgType(1)->getAs<PointerType>(); in checkCall_getpw()
382 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_mktemp()
391 const PointerType *PT = FPT->getArgType(0)->getAs<PointerType>(); in checkCall_mktemp()
555 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_strCommon()
567 const PointerType *PT = FPT->getArgType(i)->getAs<PointerType>(); in checkCall_strCommon()
589 const FunctionProtoType *FTP = FD->getType()->getAs<FunctionProtoType>(); in checkCall_rand()
596 const PointerType *PT = FTP->getArgType(0)->getAs<PointerType>(); in checkCall_rand()
[all …]
DCStringChecker.cpp206 Optional<DefinedSVal> val = V.getAs<DefinedSVal>(); in REGISTER_MAP_WITH_PROGRAMSTATE()
364 Optional<NonLoc> Length = LengthVal.getAs<NonLoc>(); in CheckBufferAccess()
375 if (Optional<Loc> BufLoc = BufStart.getAs<Loc>()) { in CheckBufferAccess()
395 if (Optional<Loc> BufLoc = BufStart.getAs<Loc>()) { in CheckBufferAccess()
431 Optional<Loc> firstLoc = firstVal.getAs<Loc>(); in CheckOverlap()
435 Optional<Loc> secondLoc = secondVal.getAs<Loc>(); in CheckOverlap()
459 reverse.getAs<DefinedOrUnknownSVal>(); in CheckOverlap()
479 Optional<NonLoc> Length = LengthVal.getAs<NonLoc>(); in CheckOverlap()
489 Optional<Loc> FirstStartLoc = FirstStart.getAs<Loc>(); in CheckOverlap()
496 Optional<Loc> FirstEndLoc = FirstEnd.getAs<Loc>(); in CheckOverlap()
[all …]
DDynamicTypePropagation.cpp214 = MsgE->getClassReceiver()->getAs<ObjCObjectType>()) in getObjectTypeForAllocAndNew()
220 = MsgE->getSuperType()->getAs<ObjCObjectType>()) in getObjectTypeForAllocAndNew()
254 CastE->getType()->getAs<ObjCObjectPointerType>(); in getBetterObjCType()
262 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()
307 while (const ParenType *PT = T->getAs<ParenType>()) in IgnoreParens()
333 template <> const TypedefType *Type::getAs() const { in getAs() function in Type
337 template <> const TemplateSpecializationType *Type::getAs() const { in getAs() function in Type
362 if (const RecordType *RT = getAs<RecordType>()) in isClassType()
367 if (const RecordType *RT = getAs<RecordType>()) in isStructureType()
372 if (const RecordType *RT = getAs<RecordType>()) in isInterfaceType()
377 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/clang/test/CodeCompletion/
Dfunction-templates.cpp11 template<typename T> T &getAs();
16 Foo().getAs<int>();
/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/lib/CodeGen/
DTargetInfo.cpp56 const RecordType *RT = T->getAs<RecordType>(); in isRecordReturnIndirect()
72 const RecordType *RT = T->getAs<RecordType>(); in getRecordArgABI()
176 const RecordType *RT = FT->getAs<RecordType>(); in isEmptyField()
194 const RecordType *RT = T->getAs<RecordType>(); in isEmptyRecord()
295 if (const ComplexType *CTy = Ty->getAs<ComplexType>()) in is32Or64BitBasicType()
301 if (!Ty->getAs<BuiltinType>() && !Ty->hasPointerRepresentation() && in is32Or64BitBasicType()
320 const RecordType *RT = Ty->getAs<RecordType>(); in canExpandIndirectArgument()
401 if (const EnumType *EnumTy = Ty->getAs<EnumType>()) in classifyArgumentType()
416 if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) in classifyReturnType()
467 } else if (const EnumType *EnumTy = Ty->getAs<EnumType>()) { in classifyArgumentType()
[all …]
/external/clang/test/SemaTemplate/
Ddependent-template-recover.cpp11 …T::getAs<U>(); // expected-error{{use 'template' keyword to treat 'getAs' as a dependent template … in f()
12 …t->T::getAs<U>(); // expected-error{{use 'template' keyword to treat 'getAs' as a dependent templa… in f()
/external/clang/tools/libclang/
DCIndexUSRs.cpp532 if (const PackExpansionType *Expansion = T->getAs<PackExpansionType>()) { in VisitType()
537 if (const BuiltinType *BT = T->getAs<BuiltinType>()) { in VisitType()
625 if (const PointerType *PT = T->getAs<PointerType>()) { in VisitType()
630 if (const ReferenceType *RT = T->getAs<ReferenceType>()) { in VisitType()
635 if (const FunctionProtoType *FT = T->getAs<FunctionProtoType>()) { in VisitType()
646 if (const BlockPointerType *BT = T->getAs<BlockPointerType>()) { in VisitType()
651 if (const ComplexType *CT = T->getAs<ComplexType>()) { in VisitType()
656 if (const TagType *TT = T->getAs<TagType>()) { in VisitType()
661 if (const TemplateTypeParmType *TTP = T->getAs<TemplateTypeParmType>()) { in VisitType()
666 = T->getAs<TemplateSpecializationType>()) { in VisitType()
/external/clang/lib/ARCMigrate/
DTransGCAttrs.cpp66 if (QualifiedTypeLoc QL = TL.getAs<QualifiedTypeLoc>()) { in lookForAttribute()
68 } else if (AttributedTypeLoc Attr = TL.getAs<AttributedTypeLoc>()) { in lookForAttribute()
72 } else if (ArrayTypeLoc Arr = TL.getAs<ArrayTypeLoc>()) { in lookForAttribute()
74 } else if (PointerTypeLoc PT = TL.getAs<PointerTypeLoc>()) { in lookForAttribute()
76 } else if (ReferenceTypeLoc RT = TL.getAs<ReferenceTypeLoc>()) in lookForAttribute()
252 TL.getAs<AttributedTypeLoc>()) { in checkAllAtProps()

12345678