@@ -1363,11 +1363,7 @@ class SymbolicRangeInferrer
1363
1363
1364
1364
template <BinaryOperator::Opcode Op>
1365
1365
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 ());
1371
1367
1372
1368
Range CoarseLHS = fillGaps (LHS);
1373
1369
Range CoarseRHS = fillGaps (RHS);
@@ -1618,8 +1614,7 @@ template <>
1618
1614
RangeSet SymbolicRangeInferrer::VisitBinaryOperator<BO_NE>(RangeSet LHS,
1619
1615
RangeSet RHS,
1620
1616
QualType T) {
1621
-
1622
- assert (!LHS.isEmpty () && !RHS.isEmpty () && " Both ranges should be non-empty" );
1617
+ assert (!LHS.isEmpty () && !RHS.isEmpty ());
1623
1618
1624
1619
if (LHS.getAPSIntType () == RHS.getAPSIntType ()) {
1625
1620
if (intersect (RangeFactory, LHS, RHS).isEmpty ())
@@ -1803,6 +1798,12 @@ RangeSet SymbolicRangeInferrer::VisitBinaryOperator<BO_Rem>(Range LHS,
1803
1798
RangeSet SymbolicRangeInferrer::VisitBinaryOperator (RangeSet LHS,
1804
1799
BinaryOperator::Opcode Op,
1805
1800
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
+
1806
1807
switch (Op) {
1807
1808
case BO_NE:
1808
1809
return VisitBinaryOperator<BO_NE>(LHS, RHS, T);
0 commit comments