Home
last modified time | relevance | path

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

12345678910>>...13

/llvm-project-15.0.7/clang/unittests/Introspection/
H A DIntrospectionTest.cpp251 …rceInfo()->getTypeLoc().getAs<clang::FunctionTypeLoc>().getReturnLoc().getAs<clang::ElaboratedType… in TEST()
252 …rceInfo()->getTypeLoc().getAs<clang::FunctionTypeLoc>().getReturnLoc().getAs<clang::ElaboratedType… in TEST()
253 …rceInfo()->getTypeLoc().getAs<clang::FunctionTypeLoc>().getReturnLoc().getAs<clang::ElaboratedType… in TEST()
255 …AIR(MethodDecl, getTypeSourceInfo()->getTypeLoc().getAs<clang::FunctionTypeLoc>().getReturnLoc().g… in TEST()
257 …AIR(MethodDecl, getTypeSourceInfo()->getTypeLoc().getAs<clang::FunctionTypeLoc>().getReturnLoc().g… in TEST()
1264 STRING_LOCATION_STDPAIR(TL, getAs<clang::FunctionTypeLoc>().getReturnLoc().getAs<clang::BuiltinType… in TEST()
1265 STRING_LOCATION_STDPAIR(TL, getAs<clang::FunctionTypeLoc>().getReturnLoc().getAs<clang::BuiltinType… in TEST()
1324 STRING_LOCATION_STDPAIR(TL, getAs<clang::PointerTypeLoc>().getPointeeLoc().getAs<clang::BuiltinType… in TEST()
1325 STRING_LOCATION_STDPAIR(TL, getAs<clang::PointerTypeLoc>().getPointeeLoc().getAs<clang::BuiltinType… in TEST()
1328 STRING_LOCATION_STDPAIR(TL, getAs<clang::PointerTypeLoc>().getSigilLoc()), in TEST()
[all …]
/llvm-project-15.0.7/clang/lib/Analysis/
H A DProgramPoint.cpp67 auto FEP = getAs<FunctionExitPoint>(); in printJson()
204 if (getAs<PreLoad>()) in printJson()
206 else if (getAs<PreStore>()) in printJson()
208 else if (getAs<PostAllocatorCall>()) in printJson()
210 else if (getAs<PostCondition>()) in printJson()
212 else if (getAs<PostLoad>()) in printJson()
214 else if (getAs<PostLValue>()) in printJson()
216 else if (getAs<PostStore>()) in printJson()
218 else if (getAs<PostStmt>()) in printJson()
222 else if (getAs<PreStmtPurgeDeadSymbols>()) in printJson()
[all …]
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Core/
H A DSVals.cpp47 if (Optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>()) { in getAsFunctionDecl()
49 if (const FunctionCodeRegion *CTR = R->getAs<FunctionCodeRegion>()) in getAsFunctionDecl()
54 if (auto X = getAs<nonloc::PointerToMember>()) { in getAsFunctionDecl()
81 Optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>(); in getLocSymbolInBase()
106 if (Optional<nonloc::SymbolVal> X = getAs<nonloc::SymbolVal>()) in getAsSymbol()
113 if (auto CI = getAs<nonloc::ConcreteInt>()) in getAsInteger()
115 if (auto CI = getAs<loc::ConcreteInt>()) in getAsInteger()
121 if (Optional<loc::MemRegionVal> X = getAs<loc::MemRegionVal>()) in getAsRegion()
124 if (Optional<nonloc::LocAsInteger> X = getAs<nonloc::LocAsInteger>()) in getAsRegion()
250 return getAs<nonloc::ConcreteInt>() || getAs<loc::ConcreteInt>(); in isConstant()
[all …]
H A DExplodedGraph.cpp102 if (progPoint.getAs<PreStmtPurgeDeadSymbols>()) in shouldCollect()
106 if (!progPoint.getAs<PostStmt>() || progPoint.getAs<PostStore>()) in shouldCollect()
147 if (SuccLoc.getAs<CallEnter>() || SuccLoc.getAs<PreImplicitCall>()) in shouldCollect()
292 if (auto BEP = P.getAs<BlockEntrance>()) in getCFGBlock()
333 if (auto SP = P.getAs<StmtPoint>()) in getStmtForDiagnostics()
335 if (auto BE = P.getAs<BlockEdge>()) in getStmtForDiagnostics()
337 if (auto CE = P.getAs<CallEnter>()) in getStmtForDiagnostics()
339 if (auto CEE = P.getAs<CallExitEnd>()) in getStmtForDiagnostics()
341 if (auto PIPP = P.getAs<PostInitializer>()) in getStmtForDiagnostics()
343 if (auto CEB = P.getAs<CallExitBegin>()) in getStmtForDiagnostics()
[all …]
H A DCoreEngine.cpp214 assert(Loc.getAs<PostStmt>() || in dispatchWorkItem()
215 Loc.getAs<PostInitializer>() || in dispatchWorkItem()
216 Loc.getAs<PostImplicitCall>() || in dispatchWorkItem()
217 Loc.getAs<CallExitEnd>() || in dispatchWorkItem()
218 Loc.getAs<LoopExit>() || in dispatchWorkItem()
219 Loc.getAs<PostAllocatorCall>()); in dispatchWorkItem()
549 if (N->getLocation().getAs<CallEnter>()) { in enqueueStmtNode()
557 if (N->getLocation().getAs<PostInitializer>() || in enqueueStmtNode()
558 N->getLocation().getAs<PostImplicitCall>()|| in enqueueStmtNode()
559 N->getLocation().getAs<LoopExit>()) { in enqueueStmtNode()
[all …]
/llvm-project-15.0.7/llvm/include/llvm/Support/
H A DChrono.h120 template <typename AsPeriod> static InternalRep getAs(const Dur &D) {
129 return {getAs<std::nano>(D), "ns"};
131 return {getAs<std::micro>(D), "us"};
133 return {getAs<std::milli>(D), "ms"};
135 return {getAs<std::ratio<1>>(D), "s"};
137 return {getAs<std::ratio<60>>(D), "m"};
139 return {getAs<std::ratio<3600>>(D), "h"};
/llvm-project-15.0.7/clang/lib/AST/
H A DComment.cpp129 if (AttributedTypeLoc AttributeTL = TL.getAs<AttributedTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
132 if (QualifiedTypeLoc QualifiedTL = TL.getAs<QualifiedTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
135 if (PointerTypeLoc PointerTL = TL.getAs<PointerTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
138 if (ReferenceTypeLoc ReferenceTL = TL.getAs<ReferenceTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
141 if (AdjustedTypeLoc ATL = TL.getAs<AdjustedTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
143 if (BlockPointerTypeLoc BlockPointerTL = TL.getAs<BlockPointerTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
145 if (MemberPointerTypeLoc MemberPointerTL = TL.getAs<MemberPointerTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
147 if (ElaboratedTypeLoc ETL = TL.getAs<ElaboratedTypeLoc>()) in lookThroughTypedefOrTypeAliasLocs()
160 if (FunctionTypeLoc FTL = TL.getAs<FunctionTypeLoc>()) { in getFunctionTypeLoc()
166 TL.getAs<TemplateSpecializationTypeLoc>()) { in getFunctionTypeLoc()
[all …]
H A DType.cpp558 if (const auto *RT = getAs<RecordType>()) in isClassType()
564 if (const auto *RT = getAs<RecordType>()) in isStructureType()
570 if (const auto *RT = getAs<RecordType>()) in isObjCBoxableRecordType()
576 if (const auto *RT = getAs<RecordType>()) in isInterfaceType()
596 if (const auto *RT = getAs<RecordType>()) in isUnionType()
613 if (const auto *ET = getAs<EnumType>()) in isScopedEnumeralType()
702 ->getAs<ObjCObjectType>(); in isObjCIdOrObjectKindOfType()
1554 } else if (getAs<BlockPointerType>()) { in getObjCSubstitutions()
1559 objectType = getAs<ObjCObjectType>(); in getObjCSubstitutions()
1768 if (const auto *TT = getAs<TagType>()) in getAsTagDecl()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clangd/
H A DHeuristicResolver.cpp38 if (const auto *RT = T->getAs<RecordType>()) in resolveTypeToRecordDecl()
41 if (const auto *ICNT = T->getAs<InjectedClassNameType>()) in resolveTypeToRecordDecl()
46 const auto *TST = T->getAs<TemplateSpecializationType>(); in resolveTypeToRecordDecl()
80 auto *TST = T->getAs<TemplateSpecializationType>(); in getPointeeType()
121 if (const auto *BT = BaseType->getAs<BuiltinType>()) { in resolveMemberExpr()
144 if (const auto *FnTypePtr = CalleeType->getAs<PointerType>()) in resolveTypeOfCallExpr()
146 if (const FunctionType *FnType = CalleeType->getAs<FunctionType>()) { in resolveTypeOfCallExpr()
254 if (auto *ET = T->getAs<EnumType>()) { in resolveDependentMember()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/cert/
H A DPostfixOperatorCheck.cpp46 if (const auto *RefType = ReturnType->getAs<ReferenceType>()) { in check()
51 if (Location.isMacroID() || ReturnType->getAs<TypedefType>() || in check()
52 RefType->getPointeeTypeAsWritten()->getAs<TypedefType>()) in check()
78 if (!Location.isMacroID() && !ReturnType->getAs<TypedefType>()) in check()
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A DCheckPlacementNew.cpp83 if (auto ElementCountNL = ElementCount.getAs<NonLoc>()) { in getExtentSizeOfNewTarget()
107 const auto SizeOfTargetCI = SizeOfTarget.getAs<nonloc::ConcreteInt>(); in checkPlaceCapacityIsSufficient()
110 const auto SizeOfPlaceCI = SizeOfPlace.getAs<nonloc::ConcreteInt>(); in checkPlaceCapacityIsSufficient()
192 const DeclRegion *TheElementDeclRegion = SuperRegion->getAs<DeclRegion>(); in checkElementRegionAlign()
196 const DeclRegion *BaseDeclRegion = R->getBaseRegion()->getAs<DeclRegion>(); in checkElementRegionAlign()
242 if (const VarRegion *TheVarRegion = BaseRegion->getAs<VarRegion>()) { in checkFieldRegionAlign()
284 if (const ElementRegion *TheElementRegion = MRegion->getAs<ElementRegion>()) in checkPlaceIsAlignedProperly()
286 else if (const FieldRegion *TheFieldRegion = MRegion->getAs<FieldRegion>()) in checkPlaceIsAlignedProperly()
288 else if (const VarRegion *TheVarRegion = MRegion->getAs<VarRegion>()) in checkPlaceIsAlignedProperly()
H A DCheckSecuritySyntaxOnly.cpp353 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_bcmp()
363 const PointerType *PT = FPT->getParamType(i)->getAs<PointerType>(); in checkCall_bcmp()
395 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_bcopy()
405 const PointerType *PT = FPT->getParamType(i)->getAs<PointerType>(); in checkCall_bcopy()
438 const FunctionProtoType *FPT = FD->getType()->getAs<FunctionProtoType>(); in checkCall_bzero()
447 const PointerType *PT = FPT->getParamType(0)->getAs<PointerType>(); in checkCall_bzero()
489 const PointerType *PT = FPT->getParamType(0)->getAs<PointerType>(); in checkCall_gets()
529 const PointerType *PT = FPT->getParamType(1)->getAs<PointerType>(); in checkCall_getpw()
569 const PointerType *PT = FPT->getParamType(0)->getAs<PointerType>(); in checkCall_mktemp()
837 const PointerType *PT = FPT->getParamType(i)->getAs<PointerType>(); in checkCall_strCommon()
[all …]
H A DLLVMConventionsChecker.cpp30 const RecordType *RT = T->getAs<RecordType>(); in IsLLVMStringRef()
50 if (const ElaboratedType *QT = T->getAs<ElaboratedType>()) in IsStdString()
53 const TypedefType *TT = T->getAs<TypedefType>(); in IsStdString()
82 const TemplateSpecializationType *TS = T->getAs<TemplateSpecializationType>(); in IsStdVector()
96 const TemplateSpecializationType *TS = T->getAs<TemplateSpecializationType>(); in IsSmallVector()
203 if (const RecordType *baseT = T->getAs<RecordType>()) { in IsPartOfAST()
249 if (const RecordType *RT = T->getAs<RecordType>()) { in Visit()
H A DGTestChecker.cpp229 auto *RefTy = CtorDecl->getParamDecl(0)->getType()->getAs<ReferenceType>(); in checkPostCall()
262 State->getLValue(SuccessField, Instance).getAs<Loc>(); in getAssertionResultSuccessFieldValue()
273 auto DVal1 = Val1.getAs<DefinedOrUnknownSVal>(); in assumeValuesEqual()
274 auto DVal2 = Val2.getAs<DefinedOrUnknownSVal>(); in assumeValuesEqual()
279 C.getSValBuilder().evalEQ(State, *DVal1, *DVal2).getAs<DefinedSVal>(); in assumeValuesEqual()
H A DNSErrorChecker.cpp200 if (Optional<loc::MemRegionVal> X = val.getAs<loc::MemRegionVal>()) { in parameterTypeFromSVal()
202 if (const VarRegion *VR = R->getAs<VarRegion>()) in parameterTypeFromSVal()
293 const PointerType* PPT = T->getAs<PointerType>(); in IsNSError()
298 PPT->getPointeeType()->getAs<ObjCObjectPointerType>(); in IsNSError()
313 const PointerType* PPT = T->getAs<PointerType>(); in IsCFError()
316 const TypedefType* TT = PPT->getPointeeType()->getAs<TypedefType>(); in IsCFError()
H A DArrayBoundCheckerV2.cpp87 Optional<nonloc::SymbolVal> SymVal = offset.getAs<nonloc::SymbolVal>(); in getSimplifiedOffsets()
146 if (Optional<NonLoc> NV = extentBegin.getAs<NonLoc>()) { in checkLocation()
147 if (auto ConcreteNV = NV->getAs<nonloc::ConcreteInt>()) { in checkLocation()
158 Optional<NonLoc> lowerBoundToCheck = lowerBound.getAs<NonLoc>(); in checkLocation()
185 if (auto ConcreteSize = Size.getAs<nonloc::ConcreteInt>()) { in checkLocation()
197 Optional<NonLoc> upperboundToCheck = upperbound.getAs<NonLoc>(); in checkLocation()
/llvm-project-15.0.7/clang/lib/ExtractAPI/
H A DTypedefUnderlyingTypeResolver.cpp25 const TypedefType *TypedefTy = Type->getAs<TypedefType>(); in getUnderlyingTypeDecl()
28 if (const TagType *TagTy = Type->getAs<TagType>()) { in getUnderlyingTypeDecl()
31 Type->getAs<ObjCInterfaceType>()) { in getUnderlyingTypeDecl()
55 const TypedefType *TypedefTy = Type->getAs<TypedefType>(); in getSymbolReferenceForType()
/llvm-project-15.0.7/clang/unittests/Analysis/
H A DCFGTest.cpp130 EXPECT_TRUE(ElementRef->getAs<CFGStmt>()); in TEST()
131 EXPECT_TRUE((*ElementRef).getAs<CFGStmt>()); in TEST()
154 EXPECT_TRUE(ElementRef->getAs<CFGStmt>()); in TEST()
155 EXPECT_TRUE((*ElementRef).getAs<CFGStmt>()); in TEST()
178 EXPECT_TRUE(ElementRef->getAs<CFGStmt>()); in TEST()
179 EXPECT_TRUE((*ElementRef).getAs<CFGStmt>()); in TEST()
201 EXPECT_TRUE(ElementRef->getAs<CFGStmt>()); in TEST()
202 EXPECT_TRUE((*ElementRef).getAs<CFGStmt>()); in TEST()
/llvm-project-15.0.7/clang/test/Analysis/
H A Dcast-value-notes.cpp60 const T *getAs() const;
284 const auto &C = S->getAs<Circle>(); in evalZeroParamNullReturn()
324 template <typename T> T *getAs() { in getAs() function in llvm::PointerUnion
331 void d() { c.getAs<int>(); } in d()
/llvm-project-15.0.7/clang/lib/Sema/
H A DSemaExceptionSpec.cpp29 if (const PointerType *PtrTy = T->getAs<PointerType>()) in GetUnderlyingFunction()
31 else if (const ReferenceType *RefTy = T->getAs<ReferenceType>()) in GetUnderlyingFunction()
35 return T->getAs<FunctionProtoType>(); in GetUnderlyingFunction()
134 if (const PointerType *PT = T->getAs<PointerType>()) { in CheckSpecifiedExceptionType()
194 if (const PointerType *PT = T->getAs<PointerType>()) in CheckDistantExceptionSpec()
466 if (auto FTLoc = TL.getAs<FunctionProtoTypeLoc>()) in CheckEquivalentExceptionSpec()
1041 if ((FT = T->getAs<FunctionProtoType>())) { in canCalleeThrow()
1043 FT = PT->getPointeeType()->getAs<FunctionProtoType>(); in canCalleeThrow()
1045 FT = RT->getPointeeType()->getAs<FunctionProtoType>(); in canCalleeThrow()
1047 FT = MT->getPointeeType()->getAs<FunctionProtoType>(); in canCalleeThrow()
[all …]
H A DSemaCast.cpp507 if (auto Ptr = From->getAs<PointerType>()) { in diagnoseBadCast()
512 if (auto Ptr = To->getAs<PointerType>()) { in diagnoseBadCast()
517 auto RecFrom = From->getAs<RecordType>(); in diagnoseBadCast()
518 auto RecTo = To->getAs<RecordType>(); in diagnoseBadCast()
1247 auto *SrcPtrType = SrcType->getAs<PointerType>(); in IsAddressSpaceConversion()
1609 if (!DestType->getAs<RecordType>() || !SrcType->getAs<RecordType>()) { in TryStaticDowncast()
1999 if (!SrcType->getAs<PointerType>() || !DestType->getAs<PointerType>()) { in CheckCompatibleReinterpretCast()
2005 if (!DestType->getAs<ReferenceType>()) { in CheckCompatibleReinterpretCast()
2022 if (SrcTy->getAs<TagType>() || DestTy->getAs<TagType>()) { in CheckCompatibleReinterpretCast()
2559 auto SrcPtrType = SrcType->getAs<PointerType>(); in TryAddressSpaceCast()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DForwardingReferenceOverloadCheck.cpp39 if (const auto *Dependent = BaseType->getAs<DependentNameType>()) { in AST_MATCHER()
44 if (CheckTemplate(BaseType->getAs<TemplateSpecializationType>())) in AST_MATCHER()
46 if (const auto *Elaborated = BaseType->getAs<ElaboratedType>()) { in AST_MATCHER()
48 if (CheckTemplate(Qualifier->getAs<TemplateSpecializationType>())) { in AST_MATCHER()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/mpi/
H A DTypeMismatchCheck.cpp155 Complex->getElementType().getTypePtr()->getAs<BuiltinType>(); in isCComplexTypeMatching()
187 Template->getArg(0).getAsType().getTypePtr()->getAs<BuiltinType>(); in isCXXComplexTypeMatching()
309 if (const auto *Typedef = BT->getAs<TypedefType>()) { in checkArguments()
311 } else if (const auto *Complex = BT->getAs<ComplexType>()) { in checkArguments()
314 } else if (const auto *Template = BT->getAs<TemplateSpecializationType>()) { in checkArguments()
317 } else if (const auto *Builtin = BT->getAs<BuiltinType>()) { in checkArguments()
/llvm-project-15.0.7/clang/lib/Index/
H A DUSRGeneration.cpp659 if (const BuiltinType *BT = T->getAs<BuiltinType>()) { in VisitType()
790 if (const PointerType *PT = T->getAs<PointerType>()) { in VisitType()
805 if (const ReferenceType *RT = T->getAs<ReferenceType>()) { in VisitType()
810 if (const FunctionProtoType *FT = T->getAs<FunctionProtoType>()) { in VisitType()
823 if (const BlockPointerType *BT = T->getAs<BlockPointerType>()) { in VisitType()
828 if (const ComplexType *CT = T->getAs<ComplexType>()) { in VisitType()
833 if (const TagType *TT = T->getAs<TagType>()) { in VisitType()
838 if (const ObjCInterfaceType *OIT = T->getAs<ObjCInterfaceType>()) { in VisitType()
843 if (const ObjCObjectType *OIT = T->getAs<ObjCObjectType>()) { in VisitType()
863 if (const DependentNameType *DNT = T->getAs<DependentNameType>()) { in VisitType()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/utils/
H A DRenamerClangTidyCheck.cpp248 Base.getType()->getAs<TemplateSpecializationType>()) { in findDeclInBases()
307 if (const auto &Ref = Unqual.getAs<TagTypeLoc>()) in check()
309 else if (const auto &Ref = Unqual.getAs<InjectedClassNameTypeLoc>()) in check()
311 else if (const auto &Ref = Unqual.getAs<UnresolvedUsingTypeLoc>()) in check()
313 else if (const auto &Ref = Unqual.getAs<TemplateTypeParmTypeLoc>()) in check()
322 if (const auto &Ref = Loc->getAs<TemplateSpecializationTypeLoc>()) { in check()
335 Loc->getAs<DependentTemplateSpecializationTypeLoc>()) { in check()
415 if (const auto *Typedef = TypePtr->getAs<TypedefType>()) in check()
424 Value->getReturnType().getTypePtr()->getAs<TypedefType>()) in check()
429 Param->getType().getTypePtr()->getAs<TypedefType>()) in check()

12345678910>>...13