Home
last modified time | relevance | path

Searched refs:UO (Results 1 – 25 of 76) sorted by relevance

1234

/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/
H A DInvalidatedIteratorChecker.cpp43 void checkPreStmt(const UnaryOperator *UO, CheckerContext &C) const;
70 void InvalidatedIteratorChecker::checkPreStmt(const UnaryOperator *UO, in checkPreStmt() argument
72 if (isa<CXXThisExpr>(UO->getSubExpr())) in checkPreStmt()
76 UnaryOperatorKind OK = UO->getOpcode(); in checkPreStmt()
77 SVal SubVal = State->getSVal(UO->getSubExpr(), C.getLocationContext()); in checkPreStmt()
H A DIteratorRangeChecker.cpp51 void checkPreStmt(const UnaryOperator *UO, CheckerContext &C) const;
143 void IteratorRangeChecker::checkPreStmt(const UnaryOperator *UO, in checkPreStmt() argument
145 if (isa<CXXThisExpr>(UO->getSubExpr())) in checkPreStmt()
149 UnaryOperatorKind OK = UO->getOpcode(); in checkPreStmt()
150 SVal SubVal = State->getSVal(UO->getSubExpr(), C.getLocationContext()); in checkPreStmt()
H A DIteratorModeling.cpp154 void checkPostStmt(const UnaryOperator *UO, CheckerContext &C) const;
252 void IteratorModeling::checkPostStmt(const UnaryOperator *UO, in checkPostStmt() argument
254 UnaryOperatorKind OK = UO->getOpcode(); in checkPostStmt()
259 handlePtrIncrOrDecr(C, UO->getSubExpr(), C.getCFGElementRef(), in checkPostStmt()
/freebsd/contrib/llvm-project/clang/lib/Analysis/
H A DReachableCode.cpp251 const UnaryOperator *UO = cast<UnaryOperator>(S); in isConfigurationValue() local
252 if (UO->getOpcode() != UO_LNot && UO->getOpcode() != UO_Minus) in isConfigurationValue()
257 isConfigurationValue(UO->getSubExpr(), PP, SilenceableCondVal, in isConfigurationValue()
264 UO->getSubExpr()->IgnoreCasts()->getSourceRange()) in isConfigurationValue()
265 *SilenceableCondVal = UO->getSourceRange(); in isConfigurationValue()
609 const UnaryOperator *UO = cast<UnaryOperator>(S); in GetUnreachableLoc() local
610 R1 = UO->getSubExpr()->getSourceRange(); in GetUnreachableLoc()
611 return UO->getOperatorLoc(); in GetUnreachableLoc()
H A DThreadSafetyCommon.cpp222 else if (const auto *UO = dyn_cast<UnaryOperator>(AttrExp)) { in translateAttrExpr() local
223 if (UO->getOpcode() == UO_LNot) { in translateAttrExpr()
225 AttrExp = UO->getSubExpr()->IgnoreImplicit(); in translateAttrExpr()
492 til::SExpr *SExprBuilder::translateUnaryOperator(const UnaryOperator *UO, in translateUnaryOperator() argument
494 switch (UO->getOpcode()) { in translateUnaryOperator()
499 return new (Arena) til::Undefined(UO); in translateUnaryOperator()
504 if (const auto *DRE = dyn_cast<DeclRefExpr>(UO->getSubExpr())) { in translateUnaryOperator()
514 return translate(UO->getSubExpr(), Ctx); in translateUnaryOperator()
519 return translate(UO->getSubExpr(), Ctx); in translateUnaryOperator()
523 til::UnaryOp(til::UOP_Minus, translate(UO->getSubExpr(), Ctx)); in translateUnaryOperator()
[all …]
H A DUninitializedValues.cpp295 void VisitUnaryOperator(UnaryOperator *UO);
400 void ClassifyRefs::VisitUnaryOperator(UnaryOperator *UO) { in VisitUnaryOperator() argument
403 if (UO->isIncrementDecrementOp()) in VisitUnaryOperator()
404 classify(UO->getSubExpr(), Use); in VisitUnaryOperator()
446 const auto *UO = dyn_cast<UnaryOperator>(Ex); in VisitCallExpr() local
447 if (UO && UO->getOpcode() == UO_AddrOf) in VisitCallExpr()
448 classify(UO->getSubExpr(), isTrivialBody ? Ignore : ConstPtrUse); in VisitCallExpr()
821 while (const auto *UO = dyn_cast<UnaryOperator>(Ex)) in VisitGCCAsmStmt() local
822 Ex = stripCasts(C, UO->getSubExpr()); in VisitGCCAsmStmt()
H A DUnsafeBufferUsage.cpp52 std::string VisitUnaryOperator(const UnaryOperator *UO) { in VisitUnaryOperator() argument
53 return "UnaryOperator(" + UO->getOpcodeStr(UO->getOpcode()).str() + ")"; in VisitUnaryOperator()
529 if (auto *UO = dyn_cast<UnaryOperator>(Ptr->IgnoreParenImpCasts())) in isPtrBufferSafe() local
530 return UO && UO->getOpcode() == UnaryOperator::Opcode::UO_AddrOf; in isPtrBufferSafe()
1278 const auto *UO = dyn_cast<UnaryOperator>(S); in matches() local
1279 if (!UO || !UO->isIncrementOp()) in matches()
1281 if (!hasPointerType(*UO->getSubExpr()->IgnoreParenImpCasts())) in matches()
1283 Result.addNode(OpTag, DynTypedNode::create(*UO)); in matches()
1326 const auto *UO = dyn_cast<UnaryOperator>(S); in matches() local
1327 if (!UO || !UO->isDecrementOp()) in matches()
[all …]
H A DLifetimeSafety.cpp414 void VisitUnaryOperator(const UnaryOperator *UO) { in VisitUnaryOperator() argument
415 if (UO->getOpcode() == UO_AddrOf) { in VisitUnaryOperator()
416 const Expr *SubExpr = UO->getSubExpr(); in VisitUnaryOperator()
421 OriginID OID = FactMgr.getOriginMgr().getOrCreate(*UO); in VisitUnaryOperator()
424 UO->getOperatorLoc()); in VisitUnaryOperator()
H A DLiveVariables.cpp177 void VisitUnaryOperator(UnaryOperator *UO);
489 void TransferFunctions::VisitUnaryOperator(UnaryOperator *UO) { in VisitUnaryOperator() argument
496 switch (UO->getOpcode()) { in VisitUnaryOperator()
506 if (auto *DR = dyn_cast<DeclRefExpr>(UO->getSubExpr()->IgnoreParens())) { in VisitUnaryOperator()
H A DThreadSafety.cpp1616 void VisitUnaryOperator(const UnaryOperator *UO);
1737 if (const auto *UO = dyn_cast<UnaryOperator>(Exp)) { in checkAccess() local
1739 if (UO->getOpcode() == UO_Deref) in checkAccess()
1740 checkPtAccess(FSet, UO->getSubExpr(), AK, POK); in checkAccess()
1804 if (const auto *UO = dyn_cast<UnaryOperator>(Exp)) { in checkPtAccess() local
1805 if (UO->getOpcode() == UO_AddrOf) { in checkPtAccess()
1808 checkAccess(FSet, UO->getSubExpr(), AK, POK); in checkPtAccess()
2093 void BuildLockset::VisitUnaryOperator(const UnaryOperator *UO) { in VisitUnaryOperator() argument
2094 switch (UO->getOpcode()) { in VisitUnaryOperator()
2099 checkAccess(UO->getSubExpr(), AK_Written); in VisitUnaryOperator()
/freebsd/contrib/llvm-project/clang/lib/Sema/
H A DSemaFixItUtils.cpp105 if (const UnaryOperator *UO = dyn_cast<UnaryOperator>(Expr)) { in tryToFixConversion() local
106 if (UO->getOpcode() == UO_AddrOf) { in tryToFixConversion()
143 if (const UnaryOperator *UO = dyn_cast<UnaryOperator>(Expr)) { in tryToFixConversion() local
144 if (UO->getOpcode() == UO_Deref) { in tryToFixConversion()
H A DSemaBPF.cpp80 const auto *UO = dyn_cast<UnaryOperator>(Arg->IgnoreParens()); in isValidPreserveEnumValueArg() local
81 if (!UO) in isValidPreserveEnumValueArg()
84 const auto *CE = dyn_cast<CStyleCastExpr>(UO->getSubExpr()); in isValidPreserveEnumValueArg()
H A DSemaOpenACCAtomic.cpp111 if (const auto *UO = dyn_cast<UnaryOperator>(E)) in GetUnaryOperatorInfo() local
112 return UnaryOpInfo{UO, UO->getSubExpr()->IgnoreImpCasts(), in GetUnaryOperatorInfo()
113 UO->getOpcode()}; in GetUnaryOperatorInfo()
H A DSemaChecking.cpp10893 if (const auto *UO = dyn_cast<UnaryOperator>(E)) { in TryGetExprRange() local
10894 switch (UO->getOpcode()) { in TryGetExprRange()
10906 return TryGetExprRange(C, UO->getSubExpr(), MaxWidth, InConstantContext, in TryGetExprRange()
10911 C, UO->getSubExpr(), MaxWidth, InConstantContext, Approximate); in TryGetExprRange()
10924 return TryGetExprRange(C, UO->getSubExpr(), MaxWidth, InConstantContext, in TryGetExprRange()
10929 C, UO->getSubExpr(), MaxWidth, InConstantContext, Approximate); in TryGetExprRange()
10942 return TryGetExprRange(C, UO->getSubExpr(), MaxWidth, InConstantContext, in TryGetExprRange()
11602 if (UnaryOperator *UO = dyn_cast<UnaryOperator>(OriginalInit)) in AnalyzeBitFieldAssignment() local
11603 if (UO->getOpcode() == UO_Minus || UO->getOpcode() == UO_Not) in AnalyzeBitFieldAssignment()
11962 if (auto *UO = dyn_cast<UnaryOperator>(E)) { in getIntegerLiteral() local
[all …]
H A DSemaAvailability.cpp1043 const auto *UO = dyn_cast<UnaryOperator>(E); in extractAvailabilityExpr() local
1044 if (!UO || UO->getOpcode() != UO_LNot) { in extractAvailabilityExpr()
1047 E = UO->getSubExpr(); in extractAvailabilityExpr()
/freebsd/contrib/llvm-project/llvm/tools/llvm-size/
H A Dllvm-size.cpp596 Expected<std::unique_ptr<ObjectFile>> UO = I->getAsObjectFile(); in printFileSectionSizes() local
597 if (UO) { in printFileSectionSizes()
598 if (ObjectFile *o = dyn_cast<ObjectFile>(&*UO.get())) { in printFileSectionSizes()
616 UO.takeError())) { in printFileSectionSizes()
687 Expected<std::unique_ptr<ObjectFile>> UO = I->getAsObjectFile(); in printFileSectionSizes() local
688 if (UO) { in printFileSectionSizes()
689 if (ObjectFile *o = dyn_cast<ObjectFile>(&*UO.get())) { in printFileSectionSizes()
706 } else if (auto E = isNotObjectErrorInvalidFileType(UO.takeError())) { in printFileSectionSizes()
762 Expected<std::unique_ptr<ObjectFile>> UO = I->getAsObjectFile(); in printFileSectionSizes() local
763 if (UO) { in printFileSectionSizes()
[all …]
/freebsd/contrib/llvm-project/clang/include/clang/AST/
H A DIgnoreExpr.h154 if (auto *UO = dyn_cast<UnaryOperator>(E)) { in IgnoreParensSingleStep() local
155 if (UO->getOpcode() == UO_Extension) in IgnoreParensSingleStep()
156 return UO->getSubExpr(); in IgnoreParensSingleStep()
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/
H A DRawPtrRefLambdaCapturesChecker.cpp346 if (auto *UO = dyn_cast<UnaryOperator>(Arg)) { in checkASTDecl() local
347 auto OpCode = UO->getOpcode(); in checkASTDecl()
349 Arg = UO->getSubExpr()->IgnoreParenCasts(); in checkASTDecl()
H A DPtrTypesSemantics.cpp620 bool VisitUnaryOperator(const UnaryOperator *UO) { in VisitUnaryOperator() argument
622 return UO->getOpcode() != UO_Coawait && Visit(UO->getSubExpr()); in VisitUnaryOperator()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DShrinkWrap.cpp314 const Value *UO = getUnderlyingObject(Op->getValue()); in INITIALIZE_PASS_DEPENDENCY() local
315 if (!UO) in INITIALIZE_PASS_DEPENDENCY()
317 if (auto *Arg = dyn_cast<Argument>(UO)) in INITIALIZE_PASS_DEPENDENCY()
319 return isa<GlobalValue>(UO); in INITIALIZE_PASS_DEPENDENCY()
H A DMIRCanonicalizerPass.cpp210 for (auto &UO : MRI->use_nodbg_operands(MO.getReg())) { in rescheduleCanonically() local
211 MachineInstr *UseInst = UO.getParent(); in rescheduleCanonically()
/freebsd/contrib/llvm-project/clang/lib/Index/
H A DIndexBody.cpp90 } else if (auto UO = dyn_cast<UnaryOperator>(Parent)) { in getRolesForRef() local
91 if (UO->isIncrementDecrementOp()) { in getRolesForRef()
94 } else if (UO->getOpcode() == UO_AddrOf) { in getRolesForRef()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DScalarizer.cpp159 UnarySplitter(UnaryOperator &uo) : UO(uo) {} in UnarySplitter()
162 return Builder.CreateUnOp(UO.getOpcode(), Op, Name); in operator ()()
165 UnaryOperator &UO; member
288 bool visitUnaryOperator(UnaryOperator &UO);
854 bool ScalarizerVisitor::visitUnaryOperator(UnaryOperator &UO) { in visitUnaryOperator() argument
855 return splitUnary(UO, UnarySplitter(UO)); in visitUnaryOperator()
/freebsd/contrib/llvm-project/clang/lib/AST/
H A DExpr.cpp144 if (const UnaryOperator *UO = dyn_cast<UnaryOperator>(E)) { in isKnownToHaveBooleanValue() local
145 switch (UO->getOpcode()) { in isKnownToHaveBooleanValue()
147 return UO->getSubExpr()->isKnownToHaveBooleanValue(Semantic); in isKnownToHaveBooleanValue()
1570 } else if (auto *UO = dyn_cast<UnaryOperator>(CEE)) { in getReferencedDeclOfCallee() local
1571 if (UO->getOpcode() == UO_Deref || UO->getOpcode() == UO_AddrOf || in getReferencedDeclOfCallee()
1572 UO->getOpcode() == UO_Plus) { in getReferencedDeclOfCallee()
1573 CEE = UO->getSubExpr()->IgnoreParenImpCasts(); in getReferencedDeclOfCallee()
2575 if (auto *UO = dyn_cast<UnaryOperator>(E)) in isReadIfDiscardedInCPlusPlus11() local
2576 if (UO->getOpcode() == UO_Deref) in isReadIfDiscardedInCPlusPlus11()
2647 const UnaryOperator *UO = cast<UnaryOperator>(this); in isUnusedResultAWarning() local
[all …]
/freebsd/contrib/llvm-project/clang/lib/CodeGen/
H A DCGExprScalar.cpp214 const UnaryOperator *UO = dyn_cast<UnaryOperator>(Op.E); in CanElideOverflowCheck() local
216 if (UO && UO->getOpcode() == UO_Minus && in CanElideOverflowCheck()
219 UO->isIntegerConstantExpr(Ctx)) in CanElideOverflowCheck()
223 if (UO) in CanElideOverflowCheck()
224 return !UO->canOverflow(); in CanElideOverflowCheck()
1822 const UnaryOperator *UO = dyn_cast<UnaryOperator>(Info.E); in EmitBinOpCheck() local
1823 if (UO && UO->getOpcode() == UO_Minus) { in EmitBinOpCheck()
1825 StaticData.push_back(CGF.EmitCheckTypeDescriptor(UO->getType())); in EmitBinOpCheck()
2307 if (const auto *UO = dyn_cast<UnaryOperator>(E)) in isLValueKnownNonNull() local
2308 if (UO->getOpcode() == UO_Deref) in isLValueKnownNonNull()
[all …]

1234