Skip to content

Commit b31e2d2

Browse files
committed
remove unused variable to fix test
Signed-off-by: Justin Stitt <[email protected]>
1 parent 1769e03 commit b31e2d2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

clang/lib/Sema/SemaExpr.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9994,10 +9994,9 @@ AssignConvertType Sema::CheckSingleAssignmentConstraints(QualType LHSType,
99949994

99959995
// Check if OBT is being discarded during assignment
99969996
// The RHS may have propagated OBT, but if LHS doesn't have it, warn
9997-
if (const auto *RHSOBT = RHSType->getAs<OverflowBehaviorType>()) {
9998-
if (!LHSType->isOverflowBehaviorType()) {
9999-
result = AssignConvertType::CompatibleOBTDiscards;
10000-
}
9997+
if (RHSType->isOverflowBehaviorType() &&
9998+
!LHSType->isOverflowBehaviorType()) {
9999+
result = AssignConvertType::CompatibleOBTDiscards;
1000110000
}
1000210001

1000310002
return result;

0 commit comments

Comments
 (0)