@@ -1362,11 +1362,7 @@ class SymbolicRangeInferrer
1362
1362
1363
1363
template <BinaryOperator::Opcode Op>
1364
1364
RangeSet VisitBinaryOperator (RangeSet LHS, RangeSet RHS, QualType T) {
1365
- // We should propagate information about unfeasbility of one of the
1366
- // operands to the resulting range.
1367
- if (LHS.isEmpty () || RHS.isEmpty ()) {
1368
- return RangeFactory.getEmptySet ();
1369
- }
1365
+ assert (!LHS.isEmpty () && !RHS.isEmpty ());
1370
1366
1371
1367
Range CoarseLHS = fillGaps (LHS);
1372
1368
Range CoarseRHS = fillGaps (RHS);
@@ -1617,8 +1613,7 @@ template <>
1617
1613
RangeSet SymbolicRangeInferrer::VisitBinaryOperator<BO_NE>(RangeSet LHS,
1618
1614
RangeSet RHS,
1619
1615
QualType T) {
1620
-
1621
- assert (!LHS.isEmpty () && !RHS.isEmpty () && " Both ranges should be non-empty" );
1616
+ assert (!LHS.isEmpty () && !RHS.isEmpty ());
1622
1617
1623
1618
if (LHS.getAPSIntType () == RHS.getAPSIntType ()) {
1624
1619
if (intersect (RangeFactory, LHS, RHS).isEmpty ())
@@ -1802,6 +1797,12 @@ RangeSet SymbolicRangeInferrer::VisitBinaryOperator<BO_Rem>(Range LHS,
1802
1797
RangeSet SymbolicRangeInferrer::VisitBinaryOperator (RangeSet LHS,
1803
1798
BinaryOperator::Opcode Op,
1804
1799
RangeSet RHS, QualType T) {
1800
+ // We should propagate information about unfeasbility of one of the
1801
+ // operands to the resulting range.
1802
+ if (LHS.isEmpty () || RHS.isEmpty ()) {
1803
+ return RangeFactory.getEmptySet ();
1804
+ }
1805
+
1805
1806
switch (Op) {
1806
1807
case BO_NE:
1807
1808
return VisitBinaryOperator<BO_NE>(LHS, RHS, T);
0 commit comments