[PATCH] D152689: [NFC] Remove dead conditionals
Sindhu Chittireddy via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 12 16:31:16 PDT 2023
schittir updated this revision to Diff 530702.
schittir added a comment.
Fix clang-format issue in SemaOverload.cpp
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152689/new/
https://reviews.llvm.org/D152689
Files:
clang/lib/CodeGen/CGObjCMac.cpp
clang/lib/Sema/SemaOverload.cpp
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
Index: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
===================================================================
--- llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -2120,8 +2120,7 @@
// Avoid incrementing past stop since it could overflow.
Value *CountIfTwo = Builder.CreateAdd(
Builder.CreateUDiv(Builder.CreateSub(Span, One), Incr), One);
- Value *OneCmp = Builder.CreateICmp(
- InclusiveStop ? CmpInst::ICMP_ULT : CmpInst::ICMP_ULE, Span, Incr);
+ Value *OneCmp = Builder.CreateICmp(CmpInst::ICMP_ULE, Span, Incr);
CountIfLooping = Builder.CreateSelect(OneCmp, One, CountIfTwo);
}
Value *TripCount = Builder.CreateSelect(ZeroCmp, Zero, CountIfLooping,
Index: clang/lib/Sema/SemaOverload.cpp
===================================================================
--- clang/lib/Sema/SemaOverload.cpp
+++ clang/lib/Sema/SemaOverload.cpp
@@ -10865,8 +10865,8 @@
if (FromExpr && isa<InitListExpr>(FromExpr)) {
S.Diag(Fn->getLocation(), diag::note_ovl_candidate_bad_list_argument)
<< (unsigned)FnKindPair.first << (unsigned)FnKindPair.second << FnDesc
- << (FromExpr ? FromExpr->getSourceRange() : SourceRange()) << FromTy
- << ToTy << (unsigned)isObjectArgument << I + 1
+ << FromExpr->getSourceRange() << FromTy << ToTy
+ << (unsigned)isObjectArgument << I + 1
<< (Conv.Bad.Kind == BadConversionSequence::too_few_initializers ? 1
: Conv.Bad.Kind == BadConversionSequence::too_many_initializers
? 2
Index: clang/lib/CodeGen/CGObjCMac.cpp
===================================================================
--- clang/lib/CodeGen/CGObjCMac.cpp
+++ clang/lib/CodeGen/CGObjCMac.cpp
@@ -3809,15 +3809,9 @@
ivarList.fillPlaceholderWithInt(countSlot, ObjCTypes.IntTy, count);
llvm::GlobalVariable *GV;
- if (ForClass)
- GV =
- CreateMetadataVar("OBJC_CLASS_VARIABLES_" + ID->getName(), ivarList,
- "__OBJC,__class_vars,regular,no_dead_strip",
- CGM.getPointerAlign(), true);
- else
- GV = CreateMetadataVar("OBJC_INSTANCE_VARIABLES_" + ID->getName(), ivarList,
- "__OBJC,__instance_vars,regular,no_dead_strip",
- CGM.getPointerAlign(), true);
+ GV = CreateMetadataVar("OBJC_INSTANCE_VARIABLES_" + ID->getName(), ivarList,
+ "__OBJC,__instance_vars,regular,no_dead_strip",
+ CGM.getPointerAlign(), true);
return llvm::ConstantExpr::getBitCast(GV, ObjCTypes.IvarListPtrTy);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152689.530702.patch
Type: text/x-patch
Size: 2617 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230612/bc887397/attachment.bin>
More information about the cfe-commits
mailing list