@@ -1363,11 +1363,7 @@ class SymbolicRangeInferrer
13631363
13641364 template <BinaryOperator::Opcode Op>
13651365 RangeSet VisitBinaryOperator (RangeSet LHS, RangeSet RHS, QualType T) {
1366- // We should propagate information about unfeasbility of one of the
1367- // operands to the resulting range.
1368- if (LHS.isEmpty () || RHS.isEmpty ()) {
1369- return RangeFactory.getEmptySet ();
1370- }
1366+ assert (!LHS.isEmpty () && !RHS.isEmpty ());
13711367
13721368 Range CoarseLHS = fillGaps (LHS);
13731369 Range CoarseRHS = fillGaps (RHS);
@@ -1618,8 +1614,7 @@ template <>
16181614RangeSet SymbolicRangeInferrer::VisitBinaryOperator<BO_NE>(RangeSet LHS,
16191615 RangeSet RHS,
16201616 QualType T) {
1621-
1622- assert (!LHS.isEmpty () && !RHS.isEmpty () && " Both ranges should be non-empty" );
1617+ assert (!LHS.isEmpty () && !RHS.isEmpty ());
16231618
16241619 if (LHS.getAPSIntType () == RHS.getAPSIntType ()) {
16251620 if (intersect (RangeFactory, LHS, RHS).isEmpty ())
@@ -1803,6 +1798,12 @@ RangeSet SymbolicRangeInferrer::VisitBinaryOperator<BO_Rem>(Range LHS,
18031798RangeSet SymbolicRangeInferrer::VisitBinaryOperator (RangeSet LHS,
18041799 BinaryOperator::Opcode Op,
18051800 RangeSet RHS, QualType T) {
1801+ // We should propagate information about unfeasbility of one of the
1802+ // operands to the resulting range.
1803+ if (LHS.isEmpty () || RHS.isEmpty ()) {
1804+ return RangeFactory.getEmptySet ();
1805+ }
1806+
18061807 switch (Op) {
18071808 case BO_NE:
18081809 return VisitBinaryOperator<BO_NE>(LHS, RHS, T);
0 commit comments