/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() 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 …]
|
D | BugReporterVisitors.cpp | 182 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 …]
|
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() 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 …]
|
D | Store.cpp | 53 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()
|
D | ExprEngine.cpp | 122 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 …]
|
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() 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()
|
D | SValBuilder.cpp | 81 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()
|
D | RegionStore.cpp | 764 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/ |
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 | 261 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/ |
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 | 189 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()
|
D | NonNullParamChecker.cpp | 76 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()
|
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() 204 if (const RecordType *baseT = T->getAs<RecordType>()) { in IsPartOfAST() 247 if (const RecordType *RT = T->getAs<RecordType>()) { in Visit()
|
D | CStringChecker.cpp | 204 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 …]
|
D | DynamicTypePropagation.cpp | 198 = 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/ |
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() 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 …]
|
D | Comment.cpp | 244 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/ |
D | yaml2obj.cpp | 42 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/ |
D | FormatString.cpp | 239 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/ |
D | function-templates.cpp | 11 template<typename T> T &getAs(); 16 Foo().getAs<int>();
|
/external/clang/lib/CodeGen/ |
D | TargetInfo.cpp | 131 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/ |
D | CIndexUSRs.cpp | 533 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()
|