/external/clang/lib/StaticAnalyzer/Core/ |
D | SVals.cpp | 33 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 …]
|
D | SimpleSValBuilder.cpp | 63 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 …]
|
D | BugReporterVisitors.cpp | 191 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 …]
|
D | ExplodedGraph.cpp | 113 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()
|
D | SValBuilder.cpp | 81 if (Optional<nonloc::ConcreteInt> CI = val.getAs<nonloc::ConcreteInt>()) { in convertToArrayIndex() 322 if (Optional<nonloc::ConcreteInt> rInt = RHS.getAs<nonloc::ConcreteInt>()) in makeSymExprValNN() 326 if (Optional<nonloc::ConcreteInt> lInt = LHS.getAs<nonloc::ConcreteInt>()) in makeSymExprValNN() 342 if (Optional<Loc> LV = lhs.getAs<Loc>()) { in evalBinOp() 343 if (Optional<Loc> RV = rhs.getAs<Loc>()) in evalBinOp() 349 if (Optional<Loc> RV = rhs.getAs<Loc>()) { in evalBinOp() 421 if (Optional<Loc> L = val.getAs<Loc>()) in evalCast() 440 if (Optional<nonloc::LocAsInteger> LV = val.getAs<nonloc::LocAsInteger>()) { in evalCast()
|
D | CoreEngine.cpp | 117 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()
|
D | RegionStore.cpp | 828 Extent.getAs<nonloc::ConcreteInt>()) { in collectSubRegionBindings() 979 V.getAs<nonloc::LazyCompoundVal>()) { in VisitBinding() 1026 if (Optional<Loc> L = V.getAs<Loc>()) { in VisitCluster() 1125 V.getAs<nonloc::LazyCompoundVal>()) { in populateWorkList() 1244 if (!Array.getAs<loc::MemRegionVal>()) in ArrayToPointer() 1257 assert(!L.getAs<UnknownVal>() && "location unknown"); in getBinding() 1258 assert(!L.getAs<UndefinedVal>() && "location undefined"); in getBinding() 1266 if (L.getAs<loc::ConcreteInt>()) { in getBinding() 1269 if (!L.getAs<loc::MemRegionVal>()) { in getBinding() 1403 Optional<nonloc::LazyCompoundVal> LCV = V->getAs<nonloc::LazyCompoundVal>(); in getExistingLazyBinding() [all …]
|
/external/clang/lib/Sema/ |
D | SemaExceptionSpec.cpp | 29 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 …]
|
D | SemaCast.cpp | 405 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 …]
|
D | SemaOverload.cpp | 273 if (const PointerType* ToPtrType = ToType->getAs<PointerType>()) in isPointerConversionToVoidPointer() 1248 if (ToType->getAs<RecordType>() && FromType->getAs<RecordType>() && in TryImplicitConversion() 1343 CanTo = CanTo.getAs<PointerType>()->getPointeeType(); in IsNoReturnConversion() 1344 CanFrom = CanFrom.getAs<PointerType>()->getPointeeType(); in IsNoReturnConversion() 1346 CanTo = CanTo.getAs<BlockPointerType>()->getPointeeType(); in IsNoReturnConversion() 1347 CanFrom = CanFrom.getAs<BlockPointerType>()->getPointeeType(); in IsNoReturnConversion() 1349 CanTo = CanTo.getAs<MemberPointerType>()->getPointeeType(); in IsNoReturnConversion() 1350 CanFrom = CanFrom.getAs<MemberPointerType>()->getPointeeType(); in IsNoReturnConversion() 1520 if (const AtomicType *Atomic = FromType->getAs<AtomicType>()) in IsStandardConversion() 1736 const BuiltinType *To = ToType->getAs<BuiltinType>(); in IsIntegralPromotion() [all …]
|
/external/clang/lib/AST/ |
D | Comment.cpp | 245 if (QualifiedTypeLoc QualifiedTL = TL.getAs<QualifiedTypeLoc>()) { in fill() 250 if (PointerTypeLoc PointerTL = TL.getAs<PointerTypeLoc>()) { in fill() 255 if (ReferenceTypeLoc ReferenceTL = TL.getAs<ReferenceTypeLoc>()) { in fill() 260 if (AdjustedTypeLoc ATL = TL.getAs<AdjustedTypeLoc>()) { in fill() 265 TL.getAs<BlockPointerTypeLoc>()) { in fill() 270 TL.getAs<MemberPointerTypeLoc>()) { in fill() 274 if (ElaboratedTypeLoc ETL = TL.getAs<ElaboratedTypeLoc>()) { in fill() 279 if (FunctionTypeLoc FTL = TL.getAs<FunctionTypeLoc>()) { in fill() 288 TL.getAs<TemplateSpecializationTypeLoc>()) { in fill() 300 if (FunctionTypeLoc FTL = TL.getAs<FunctionTypeLoc>()) { in fill()
|
D | Type.cpp | 52 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 341 template <> const AttributedType *Type::getAs() const { in getAs() function in Type 366 if (const RecordType *RT = getAs<RecordType>()) in isClassType() 371 if (const RecordType *RT = getAs<RecordType>()) in isStructureType() 376 if (const RecordType *RT = getAs<RecordType>()) in isInterfaceType() [all …]
|
/external/clang/lib/StaticAnalyzer/Checkers/ |
D | NonNullParamChecker.cpp | 83 Optional<DefinedSVal> DV = V.getAs<DefinedSVal>(); in checkPreCall() 88 assert(!haveRefTypeParam || DV->getAs<Loc>()); in checkPreCall() 90 if (haveAttrNonNull && !DV->getAs<Loc>()) { in checkPreCall() 102 DV->getAs<nonloc::CompoundVal>()) { in checkPreCall() 106 DV = V.getAs<DefinedSVal>(); in checkPreCall() 110 if (!V.getAs<Loc>()) in checkPreCall()
|
D | ArrayBoundCheckerV2.cpp | 113 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()
|
D | NSErrorChecker.cpp | 191 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() 284 const PointerType* PPT = T->getAs<PointerType>(); in IsNSError() 289 PPT->getPointeeType()->getAs<ObjCObjectPointerType>(); in IsNSError() 304 const PointerType* PPT = T->getAs<PointerType>(); in IsCFError() 307 const TypedefType* TT = PPT->getPointeeType()->getAs<TypedefType>(); in IsCFError()
|
D | BoolAssignmentChecker.cpp | 46 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()
|
D | LLVMConventionsChecker.cpp | 31 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() 206 if (const RecordType *baseT = T->getAs<RecordType>()) { in IsPartOfAST() 252 if (const RecordType *RT = T->getAs<RecordType>()) { in Visit()
|
D | CheckSecuritySyntaxOnly.cpp | 310 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 …]
|
D | CStringChecker.cpp | 209 Optional<DefinedSVal> val = V.getAs<DefinedSVal>(); in REGISTER_MAP_WITH_PROGRAMSTATE() 369 Optional<NonLoc> Length = LengthVal.getAs<NonLoc>(); in CheckBufferAccess() 380 if (Optional<Loc> BufLoc = BufStart.getAs<Loc>()) { in CheckBufferAccess() 400 if (Optional<Loc> BufLoc = BufStart.getAs<Loc>()) { in CheckBufferAccess() 436 Optional<Loc> firstLoc = firstVal.getAs<Loc>(); in CheckOverlap() 440 Optional<Loc> secondLoc = secondVal.getAs<Loc>(); in CheckOverlap() 464 reverse.getAs<DefinedOrUnknownSVal>(); in CheckOverlap() 484 Optional<NonLoc> Length = LengthVal.getAs<NonLoc>(); in CheckOverlap() 494 Optional<Loc> FirstStartLoc = FirstStart.getAs<Loc>(); in CheckOverlap() 501 Optional<Loc> FirstEndLoc = FirstEnd.getAs<Loc>(); in CheckOverlap() [all …]
|
D | DynamicTypePropagation.cpp | 214 = 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/test/CodeCompletion/ |
D | function-templates.cpp | 11 template<typename T> T &getAs(); 16 Foo().getAs<int>();
|
/external/clang/lib/Analysis/ |
D | FormatString.cpp | 260 const PointerType *PT = argTy->getAs<PointerType>(); in matchesType() 279 if (const EnumType *ETy = argTy->getAs<EnumType>()) in matchesType() 282 if (const BuiltinType *BT = argTy->getAs<BuiltinType>()) in matchesType() 296 if (const EnumType *ETy = argTy->getAs<EnumType>()) in matchesType() 303 if (const BuiltinType *BT = argTy->getAs<BuiltinType>()) in matchesType() 333 const PointerType *PT = argTy->getAs<PointerType>(); in matchesType() 337 if (const BuiltinType *BT = pointeeTy->getAs<BuiltinType>()) in matchesType() 353 const PointerType *PT = argTy->getAs<PointerType>(); in matchesType() 384 if (argTy->getAs<ObjCObjectPointerType>() || in matchesType() 385 argTy->getAs<BlockPointerType>()) in matchesType() [all …]
|
/external/clang/lib/Index/ |
D | USRGeneration.cpp | 531 if (const PackExpansionType *Expansion = T->getAs<PackExpansionType>()) { in VisitType() 536 if (const BuiltinType *BT = T->getAs<BuiltinType>()) { in VisitType() 624 if (const PointerType *PT = T->getAs<PointerType>()) { in VisitType() 629 if (const ReferenceType *RT = T->getAs<ReferenceType>()) { in VisitType() 634 if (const FunctionProtoType *FT = T->getAs<FunctionProtoType>()) { in VisitType() 643 if (const BlockPointerType *BT = T->getAs<BlockPointerType>()) { in VisitType() 648 if (const ComplexType *CT = T->getAs<ComplexType>()) { in VisitType() 653 if (const TagType *TT = T->getAs<TagType>()) { in VisitType() 658 if (const TemplateTypeParmType *TTP = T->getAs<TemplateTypeParmType>()) { in VisitType() 663 = T->getAs<TemplateSpecializationType>()) { in VisitType()
|
/external/clang/lib/CodeGen/ |
D | TargetInfo.cpp | 61 const RecordType *RT = T->getAs<RecordType>(); in getRecordArgABI() 172 const RecordType *RT = FT->getAs<RecordType>(); in isEmptyField() 190 const RecordType *RT = T->getAs<RecordType>(); in isEmptyRecord() 286 if (const ComplexType *CTy = Ty->getAs<ComplexType>()) in is32Or64BitBasicType() 292 if (!Ty->getAs<BuiltinType>() && !Ty->hasPointerRepresentation() && in is32Or64BitBasicType() 311 const RecordType *RT = Ty->getAs<RecordType>(); in canExpandIndirectArgument() 383 if (const EnumType *EnumTy = Ty->getAs<EnumType>()) in classifyArgumentType() 398 if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) in classifyReturnType() 449 } else if (const EnumType *EnumTy = Ty->getAs<EnumType>()) { in classifyArgumentType() 470 if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) in classifyReturnType() [all …]
|
/external/clang/test/SemaTemplate/ |
D | dependent-template-recover.cpp | 11 …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()
|