<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/72619>72619</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            readability-container-size-empty improperly converts `c.size() < 0` to `c.empty()`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          r-barnes
      </td>
    </tr>
</table>

<pre>
    Some objects can have a `size()` which returns negative values and also have an `empty()` method.

In this case, `size() < 0` is not the same thing as `empty()`.

Currently `readability-container-size-empty` converts `x.size() < 0` to `x.empty()` - this has caused some real problems for us was an unexpected behaviour that isn't made explicit in either the documentation or the code itself.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEU8Fu2zAM_Rr5QtiQZcdODj50LQLsvC-QJTrSIEuGSKfNvn5QUqBoN2wXGxD13uPjozSRv0TESRy-icNLpXd2KU-5nnWOSNWc7G36kVaENP9EwwRGR3D6iqBBDJL8LxTqKNRJDBJenTcOMvKeI0HEi2Z_RbjqsCOBjhZ0oPQOjwWP68a3D4IV2SXbCPki5NPj-z0CO190CYV6_iwKonsGWZCeICYGdgikVyyYeAFNf4p8Yn_ec8bI4VbuZdRWzz54vtUmRdY-Yq6LWv2gGCSYFK-Y-c771vytE06P2hdr9cOG08XKTmiBylgz6gBbTnPAlWBJGXaCV12mBXvEtw0No4UZnb76tGdgpxk8RaFGhlVbBHzbgjeewUdAzw7zfQw2mX3FyJp9ipAehyZZBM-EYWkqO3X21J10hVM7Sqnk2J_ayk12OA526A9L39mhH6y2Si14PI7LouxsDpWflFRd27ajHA9t1zaLOsqjwVF2_WjQGtFLXLUPTQjXtUn5UnmiHadRDe2pCnrGQPeVUyriK9yLQqmygXkqmHreLyR6GTwxfbCw54DT_3ICv245bZjD7VNe5h95mS95VXsOk2PeSHRPQp2FOl88u31uTFqFOpeW3n_1llN5G0Kd70ZIqPPd6O8AAAD__1IoFRU">