Home
last modified time | relevance | path

Searched refs:ExpectedValue (Results 1 – 14 of 14) sorted by relevance

/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A DReturnValueChecker.cpp73 static Optional<bool> isInvariantBreak(bool ExpectedValue, SVal ReturnV, in isInvariantBreak() argument
79 if (ExpectedValue) in isInvariantBreak()
92 bool ExpectedValue = *RawExpectedValue; in checkPostCall() local
93 Optional<bool> IsInvariantBreak = isInvariantBreak(ExpectedValue, ReturnV, C); in checkPostCall()
103 [Name, ExpectedValue](PathSensitiveBugReport &) -> std::string { in checkPostCall()
108 << (ExpectedValue ? "true" : "false"); in checkPostCall()
114 State = State->assume(ReturnV.castAs<DefinedOrUnknownSVal>(), ExpectedValue); in checkPostCall()
139 bool ExpectedValue = *RawExpectedValue; in checkEndFunction() local
140 Optional<bool> IsInvariantBreak = isInvariantBreak(ExpectedValue, ReturnV, C); in checkEndFunction()
150 [Name, ExpectedValue](BugReport &BR) -> std::string { in checkEndFunction()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DInfiniteLoopCheck.cpp121 bool ExpectedValue) { in isKnownToHaveValue() argument
126 if (!ExpectedValue && BinOp->getOpcode() == BO_LAnd) in isKnownToHaveValue()
129 if (ExpectedValue && BinOp->getOpcode() == BO_LOr) in isKnownToHaveValue()
133 return isKnownToHaveValue(*BinOp->getRHS(), Ctx, ExpectedValue); in isKnownToHaveValue()
136 return isKnownToHaveValue(*UnOp->getSubExpr(), Ctx, !ExpectedValue); in isKnownToHaveValue()
138 return isKnownToHaveValue(*Paren->getSubExpr(), Ctx, ExpectedValue); in isKnownToHaveValue()
140 return isKnownToHaveValue(*ImplCast->getSubExpr(), Ctx, ExpectedValue); in isKnownToHaveValue()
145 return Result == ExpectedValue; in isKnownToHaveValue()
/llvm-project-15.0.7/llvm/lib/Transforms/Scalar/
H A DLowerExpectIntrinsic.cpp88 ConstantInt *ExpectedValue = dyn_cast<ConstantInt>(CI->getArgOperand(1)); in handleSwitchExpect() local
89 if (!ExpectedValue) in handleSwitchExpect()
92 SwitchInst::CaseHandle Case = *SI.findCaseValue(ExpectedValue); in handleSwitchExpect()
122 ConstantInt *ExpectedValue = dyn_cast<ConstantInt>(Expect->getArgOperand(1)); in handlePhiDef() local
123 if (!ExpectedValue) in handlePhiDef()
125 const APInt &ExpectedPhiValue = ExpectedValue->getValue(); in handlePhiDef()
308 ConstantInt *ExpectedValue = dyn_cast<ConstantInt>(CI->getArgOperand(1)); in handleBrSelExpect() local
309 if (!ExpectedValue) in handleBrSelExpect()
320 if ((ExpectedValue->getZExtValue() == ValueComparedTo) == in handleBrSelExpect()
H A DLoopStrengthReduce.cpp3512 llvm::Value *ExpectedValue = U; in CollectLoopInvariantFixupsAndFormulae() local
3514 if (PhiNode->getIncomingValue(I) == ExpectedValue) { in CollectLoopInvariantFixupsAndFormulae()
/llvm-project-15.0.7/llvm/lib/DebugInfo/PDB/Native/
H A DDbiModuleList.cpp125 auto ExpectedValue = Modules->getFileName(Off); in setValue() local
126 if (!ExpectedValue) { in setValue()
127 consumeError(ExpectedValue.takeError()); in setValue()
130 ThisValue = *ExpectedValue; in setValue()
/llvm-project-15.0.7/llvm/unittests/Support/
H A DCSKYAttributeParserTest.cpp75 unsigned ExpectedValue) { in testAttributeInt() argument
87 return Attr && *Attr == ExpectedValue; in testAttributeInt()
92 const char *ExpectedValue) { in testAttributeString() argument
104 return Attr && *Attr == ExpectedValue; in testAttributeString()
H A DRISCVAttributeParserTest.cpp36 unsigned ExpectedValue) { in testAttribute() argument
48 return Attr && *Attr == ExpectedValue; in testAttribute()
H A DARMAttributeParser.cpp29 unsigned ExpectedTag, unsigned ExpectedValue) { in testBuildAttr() argument
41 return Attr && *Attr == ExpectedValue; in testBuildAttr()
/llvm-project-15.0.7/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/
H A Dllvm-support.cpp20 llvm::Expected<int> ExpectedValue(8); variable
70 dont_strip(ExpectedValue); in main()
H A Dllvm-support.gdb20 p ExpectedValue
/llvm-project-15.0.7/clang/include/clang/ASTMatchers/
H A DASTMatchersInternal.h1754 explicit ValueEqualsMatcher(const ValueT &ExpectedValue)
1755 : ExpectedValue(ExpectedValue) {}
1758 return Node.getValue() == ExpectedValue;
1762 ValueT ExpectedValue;
1771 return Node.getValue().convertToFloat() == ExpectedValue;
1773 return Node.getValue().convertToDouble() == ExpectedValue;
1780 return Node.getValue().convertToFloat() == ExpectedValue;
1782 return Node.getValue().convertToDouble() == ExpectedValue;
1788 return ExpectedValue.compare(Node.getValue()) == llvm::APFloat::cmpEqual;
/llvm-project-15.0.7/llvm/unittests/FileCheck/
H A DFileCheckTest.cpp406 static void expectValueEqual(ExpressionValue ActualValue, T ExpectedValue) { in expectValueEqual() argument
407 EXPECT_EQ(ExpectedValue < 0, ActualValue.isNegative()); in expectValueEqual()
408 if (ExpectedValue < 0) { in expectValueEqual()
411 EXPECT_EQ(*SignedActualValue, static_cast<int64_t>(ExpectedValue)); in expectValueEqual()
415 EXPECT_EQ(*UnsignedActualValue, static_cast<uint64_t>(ExpectedValue)); in expectValueEqual()
/llvm-project-15.0.7/llvm/lib/Target/AMDGPU/
H A DSIInstrInfo.cpp8325 this](int64_t ExpectedValue, unsigned SrcSize, in optimizeCompareInstr()
8380 ExpectedValue <<= BitNo; in optimizeCompareInstr()
8383 if (CmpValue != ExpectedValue) { in optimizeCompareInstr()
8386 IsReversedCC = CmpValue == (ExpectedValue ^ Mask); in optimizeCompareInstr()
/llvm-project-15.0.7/clang/lib/CodeGen/
H A DCGBuiltin.cpp2739 Value *ExpectedValue = EmitScalarExpr(E->getArg(1)); in EmitBuiltinExpr() local
2748 Builder.CreateCall(FnExpect, {ArgValue, ExpectedValue}, "expval"); in EmitBuiltinExpr()
2755 Value *ExpectedValue = EmitScalarExpr(E->getArg(1)); in EmitBuiltinExpr() local
2775 FnExpect, {ArgValue, ExpectedValue, Confidence}, "expval"); in EmitBuiltinExpr()