Home
last modified time | relevance | path

Searched refs:Cast (Results 1 – 25 of 146) sorted by relevance

123456

/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A DConversionChecker.cpp60 if (Cast->getType()->isBooleanType()) in checkPreStmt()
64 if (Cast->getExprLoc().isMacroID()) in checkPreStmt()
85 LossOfPrecision = isLossOfPrecision(Cast, Cast->getType(), C); in checkPreStmt()
91 LossOfSign = isLossOfSign(Cast, C); in checkPreStmt()
94 LossOfSign = isLossOfSign(Cast, C); in checkPreStmt()
97 LossOfSign = isLossOfSign(Cast, C); in checkPreStmt()
100 LossOfSign = isLossOfSign(Cast, C); in checkPreStmt()
108 LossOfPrecision = isLossOfPrecision(Cast, Cast->getType(), C); in checkPreStmt()
111 LossOfSign = isLossOfSign(Cast, C); in checkPreStmt()
112 LossOfPrecision = isLossOfPrecision(Cast, Cast->getType(), C); in checkPreStmt()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/
H A DImplicitBoolConversionCheck.cpp108 const Expr *SubExpr = Cast->getSubExpr(); in fixGenericExprCastToBool()
140 Cast->getCastKind(), SubExpr->getType(), Context); in fixGenericExprCastToBool()
181 const Expr *SubExpr = Cast->getSubExpr(); in fixGenericExprCastFromBool()
185 Cast->getBeginLoc(), in fixGenericExprCastFromBool()
191 Cast->getEndLoc(), 0, Context.getSourceManager(), in fixGenericExprCastFromBool()
220 bool isCastAllowedInCondition(const ImplicitCastExpr *Cast, in isCastAllowedInCondition() argument
223 Q.push(Cast); in isCastAllowedInCondition()
354 (Cast->getCastKind() == CK_PointerToBoolean || in handleCastToBool()
356 isCastAllowedInCondition(Cast, Context)) { in handleCastToBool()
361 isCastAllowedInCondition(Cast, Context)) { in handleCastToBool()
[all …]
H A DMakeMemberFunctionConstCheck.cpp101 bool visitUser(const ImplicitCastExpr *Cast) { in visitUser() argument
102 if (Cast->getCastKind() != CK_NoOp) in visitUser()
106 QualType QT = Cast->getType(); in visitUser()
113 const auto *Parent = getParent<Stmt>(Cast); in visitUser()
152 if (const auto *Cast = dyn_cast_or_null<ImplicitCastExpr>(Parent)) { in visitUser() local
158 !Cast->getType()->isBuiltinType()) in visitUser()
161 if (Cast->getCastKind() == CK_LValueToRValue) in visitUser()
164 if (Cast->getCastKind() == CK_NoOp && Cast->getType().isConstQualified()) in visitUser()
191 if (const auto *Cast = dyn_cast_or_null<ImplicitCastExpr>(Parent)) { in VisitCXXThisExpr() local
192 if (visitUser(Cast)) in VisitCXXThisExpr()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DSwappedArgumentsCheck.cpp29 if (auto *Cast = dyn_cast<CastExpr>(E)) in ignoreNoOpCasts() local
30 if (Cast->getCastKind() == CK_LValueToRValue || in ignoreNoOpCasts()
31 Cast->getCastKind() == CK_NoOp) in ignoreNoOpCasts()
32 return ignoreNoOpCasts(Cast->getSubExpr()); in ignoreNoOpCasts()
39 static bool isImplicitCastCandidate(const CastExpr *Cast) { in isImplicitCastCandidate() argument
40 return Cast->getCastKind() == CK_UserDefinedConversion || in isImplicitCastCandidate()
41 Cast->getCastKind() == CK_FloatingToBoolean || in isImplicitCastCandidate()
42 Cast->getCastKind() == CK_FloatingToIntegral || in isImplicitCastCandidate()
43 Cast->getCastKind() == CK_IntegralToBoolean || in isImplicitCastCandidate()
44 Cast->getCastKind() == CK_IntegralToFloating || in isImplicitCastCandidate()
[all …]
H A DMisplacedWideningCastCheck.cpp42 const auto Cast = in registerMatchers() local
45 Finder->addMatcher(varDecl(hasInitializer(Cast)), this); in registerMatchers()
46 Finder->addMatcher(returnStmt(hasReturnValue(Cast)), this); in registerMatchers()
47 Finder->addMatcher(callExpr(hasAnyArgument(Cast)), this); in registerMatchers()
50 binaryOperator(isComparisonOperator(), hasEitherOperand(Cast)), this); in registerMatchers()
182 const auto *Cast = Result.Nodes.getNodeAs<CastExpr>("Cast"); in check() local
183 if (!CheckImplicitCasts && isa<ImplicitCastExpr>(Cast)) in check()
185 if (Cast->getBeginLoc().isMacroID()) in check()
192 if (Cast->isTypeDependent() || Cast->isValueDependent() || in check()
198 QualType CastType = Cast->getType(); in check()
[all …]
/llvm-project-15.0.7/llvm/lib/Analysis/
H A DPHITransAddr.cpp187 if (CastInst *Cast = dyn_cast<CastInst>(Inst)) { in PHITranslateSubExpr() local
188 if (!isSafeToSpeculativelyExecute(Cast)) return nullptr; in PHITranslateSubExpr()
191 if (PHIIn == Cast->getOperand(0)) in PHITranslateSubExpr()
192 return Cast; in PHITranslateSubExpr()
198 return AddAsInput(ConstantExpr::getCast(Cast->getOpcode(), in PHITranslateSubExpr()
199 C, Cast->getType())); in PHITranslateSubExpr()
205 if (CastI->getOpcode() == Cast->getOpcode() && in PHITranslateSubExpr()
206 CastI->getType() == Cast->getType() && in PHITranslateSubExpr()
382 if (CastInst *Cast = dyn_cast<CastInst>(Inst)) { in InsertPHITranslatedSubExpr() local
383 if (!isSafeToSpeculativelyExecute(Cast)) return nullptr; in InsertPHITranslatedSubExpr()
[all …]
/llvm-project-15.0.7/llvm/lib/Target/X86/
H A DX86PartialReduction.cpp82 if (auto *Cast = dyn_cast<CastInst>(Op)) { in matchVPDPBUSDPattern() local
83 if (Cast->getParent() == Mul->getParent() && in matchVPDPBUSDPattern()
84 (Cast->getOpcode() == Instruction::SExt || in matchVPDPBUSDPattern()
85 Cast->getOpcode() == Instruction::ZExt) && in matchVPDPBUSDPattern()
86 Cast->getOperand(0)->getType()->getScalarSizeInBits() <= 8) in matchVPDPBUSDPattern()
149 if (auto *Cast = dyn_cast<CastInst>(Op)) { in tryMAddReplacement() local
150 if (Cast->getParent() == Mul->getParent() && in tryMAddReplacement()
151 (Cast->getOpcode() == Instruction::SExt || in tryMAddReplacement()
152 Cast->getOpcode() == Instruction::ZExt) && in tryMAddReplacement()
153 Cast->getOperand(0)->getType()->getScalarSizeInBits() <= 16) in tryMAddReplacement()
H A DX86LowerAMXType.cpp707 void combineLoadCast(IntrinsicInst *Cast, LoadInst *LD);
920 Value *Tile = Cast->getOperand(0); in combineCastStore()
947 Use &U = *(Cast->use_begin()); in combineLoadCast()
964 Cast->replaceAllUsesWith(NewInst); in combineLoadCast()
969 for (auto *Cast : Casts) { in combineLdSt() local
970 auto *II = cast<IntrinsicInst>(Cast); in combineLdSt()
978 for (User *U : Cast->users()) { in combineLdSt()
982 combineCastStore(cast<IntrinsicInst>(Cast), Store); in combineLdSt()
990 auto *Load = dyn_cast<LoadInst>(Cast->getOperand(0)); in combineLdSt()
998 combineLoadCast(cast<IntrinsicInst>(Cast), Load); in combineLdSt()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/
H A DUseBoolLiteralsCheck.cpp55 const auto *Cast = Result.Nodes.getNodeAs<Expr>("cast"); in check() local
61 const Expr *Expression = Cast ? Cast : Literal; in check()
H A DUseNullptrCheck.cpp149 const ImplicitCastExpr *Cast = dyn_cast<ImplicitCastExpr>(S); in VisitStmt() local
150 if (Cast && (Cast->getCastKind() == CK_NullToPointer || in VisitStmt()
151 Cast->getCastKind() == CK_NullToMemberPointer)) in VisitStmt()
/llvm-project-15.0.7/llvm/lib/Target/SystemZ/
H A DSystemZTDC.cpp243 if (auto *Cast = dyn_cast<BitCastInst>(Op0)) { in convertICmp() local
245 if (!Cast->getSrcTy()->isFloatTy() && in convertICmp()
246 !Cast->getSrcTy()->isDoubleTy() && in convertICmp()
247 !Cast->getSrcTy()->isFP128Ty()) in convertICmp()
249 Value *V = Cast->getOperand(0); in convertICmp()
261 PossibleJunk.insert(Cast); in convertICmp()
/llvm-project-15.0.7/llvm/lib/Target/AMDGPU/
H A DAMDGPUPromoteKernelArguments.cpp120 Value *Cast = in promotePointer() local
123 B.CreateAddrSpaceCast(Cast, PT, Twine(Ptr->getName(), ".flat")); in promotePointer()
125 [Cast](Use &U) { return U.getUser() != Cast; }); in promotePointer()
/llvm-project-15.0.7/llvm/test/DebugInfo/PDB/Inputs/
H A Devery-class.cpp16 struct Cast { struct
44 f(Cast{}); in main()
/llvm-project-15.0.7/lldb/source/Core/
H A DValueObjectConstResultCast.cpp60 ValueObjectConstResultCast::Cast(const CompilerType &compiler_type) { in Cast() function in ValueObjectConstResultCast
61 return m_impl.Cast(compiler_type); in Cast()
H A DValueObjectConstResultChild.cpp72 ValueObjectConstResultChild::Cast(const CompilerType &compiler_type) { in Cast() function in ValueObjectConstResultChild
73 return m_impl.Cast(compiler_type); in Cast()
/llvm-project-15.0.7/clang-tools-extra/docs/clang-tidy/checks/abseil/
H A Dduration-conversion-cast.rst13 // Original - Cast from a double to an integer
21 // Original - Cast from a double to an integer
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/cppcoreguidelines/
H A DNarrowingConversionsCheck.cpp547 const ASTContext &Context, const ImplicitCastExpr &Cast) { in handleImplicitCast() argument
548 if (Cast.getExprLoc().isMacroID()) in handleImplicitCast()
550 const Expr &Lhs = Cast; in handleImplicitCast()
551 const Expr &Rhs = *Cast.getSubExpr(); in handleImplicitCast()
557 switch (Cast.getCastKind()) { in handleImplicitCast()
593 if (const auto *Cast = Result.Nodes.getNodeAs<ImplicitCastExpr>("cast")) in check() local
594 return handleImplicitCast(*Result.Context, *Cast); in check()
/llvm-project-15.0.7/llvm/lib/Transforms/Utils/
H A DCallPromotionUtils.cpp178 auto *Cast = CastInst::CreateBitOrPointerCast(&CB, RetTy, "", InsertBefore); in createRetBitCast() local
180 *RetBitCast = Cast; in createRetBitCast()
184 U->replaceUsesOfWith(&CB, Cast); in createRetBitCast()
499 auto *Cast = CastInst::CreateBitOrPointerCast(Arg, FormalTy, "", &CB); in promoteCall() local
500 CB.setArgOperand(ArgNo, Cast); in promoteCall()
/llvm-project-15.0.7/llvm/test/Assembler/
H A DConstantExprFoldCast.ll11 @A = global i32* bitcast (i8* null to i32*) ; Cast null -> fold
12 @B = global i32** bitcast (i32** @A to i32**) ; Cast to same type -> fold
/llvm-project-15.0.7/mlir/include/mlir/Interfaces/
H A DCastInterfaces.td1 //===- CastInterfaces.td - Cast Interfaces for ops ---------*- tablegen -*-===//
23 arity of the outputs may be anything from 1-N. Cast-like operations are
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Core/
H A DStore.cpp251 SVal StoreManager::evalDerivedToBase(SVal Derived, const CastExpr *Cast) { in evalDerivedToBase() argument
254 if (!regionMatchesCXXRecordType(Derived, Cast->getSubExpr()->getType())) in evalDerivedToBase()
259 for (CastExpr::path_const_iterator I = Cast->path_begin(), in evalDerivedToBase()
260 E = Cast->path_end(); in evalDerivedToBase()
H A DDynamicType.cpp86 for (const DynamicCastInfo &Cast : *Lookup) in getDynamicCastInfo()
87 if (Cast.equals(CastFromTy, CastToTy)) in getDynamicCastInfo()
88 return &Cast; in getDynamicCastInfo()
/llvm-project-15.0.7/lldb/test/API/lang/cpp/dynamic-value/
H A DTestCppValueCast.py94 instanceA = tellerA.Cast(typeA.GetPointerType())
123 instanceB = tellerB.Cast(typeB.GetPointerType())
/llvm-project-15.0.7/llvm/lib/Target/WebAssembly/
H A DWebAssemblyFixFunctionBitcasts.cpp182 Instruction *Cast = in createWrapper() local
184 BB->getInstList().push_back(Cast); in createWrapper()
185 ReturnInst::Create(M->getContext(), Cast, BB); in createWrapper()
/llvm-project-15.0.7/lldb/examples/summaries/cocoa/
H A DSelector.py12 return valobj.Cast(valobj.GetType().GetBasicType(

123456