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

    <tr>
        <th>Summary</th>
        <td>
            Stumbling over semantics of AssertionInfoMatcher::CheckMessageMatches
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          hawkinsw
      </td>
    </tr>
</table>

<pre>
    I just got bit by a nasty oddity in the semantics of `AssertionInfoMatcher::CheckMessageMatches` where 

```C++
// Allow any match
```
(see [1] below)

was not the behavior that I expected. 

I was getting a positive match for

```
nnot increment an iterator already at the end.
```

when attempting to check that

```
Cannot increment an iterator already at the end.
```

was the assertion's message.

Would there be any willingness to change the semantics of the this matcher? Maybe "anchored at the beginning"? Or "must match entirely"?

If so, I am happy to take the lead on making that change. I hope that this is not a bother.

[1] https://github.com/llvm/llvm-project/blob/21a784f24e3f6c09558de6a3dfb32e2069955405/libcxx/test/support/check_assertion.h#L92
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyslEGPqzYQxz-NuYwaGQMhHDhkdxUpUlc99NBjNYYJ-K2xkT1slm9fGZr2bftUaaVKVgL2ePyb-f8xxmgGR9SK6klULxkuPPrQjnh_My7eM-37tb3CtyUyDJ5BGwa9AoLDyCv4vje8gnHAI0GkCR2bLoK_gTjKc4wU2Hh3dTf_ityNFERxFsX5eaTu7ZVixIH2hSiOEu4jBQIhX4Q8__l7lPt4FuopjX1WXYS6wNlafwd0K0wpxz92PEJPkQhE9ZSL6gU0WX8Xqvn-jDtGcJ63EjSN-G58AB6R4Qr0MVPH1B8-UV0h7RmI2bgBEGYfDZt32jng5sMPa9hfXTrLuC7QRI4BHRimgOwDoA2E_Qq4w5DrDz8uauceyQEy0zRvHOyhS33d2P8D4Bn_PwSMWxg-lBaqjjDtwh6-j_zNL7ZPsSE1eRPtbqw1bnAU486ObqB_GylN8Gji3tzkoAu84qoJhFLoutEH6h-8mgbjnHGDUCoF_hJS1JTsu2tDjk0gu-7rn0S9QfRCPcMVcIIR53lNWIxvO5Ql7ME7mPBt63YyyM58gCuMfqZ9bmM1u6UQtE81f2rFw4sj8xzT97C5eTA8LvrQ-Umoi7Xvj7-f5uC_UcdCXbT1WqiLyrE-lTdVUnE7drKpqlNPRyz6my4UKXlsmqoqZZUSGN19fAh1YYopQ1zm2Yf0tDnl9790O4xCFT83Kuvbom-KBjNq81qWjTo1ss7G9njr67JsTvJUqa7rVNdrPOWqbopKaTxhZlolVSnzXKpC5WV9wLLKa5nrY6OxViRFKWlCYw-pqoMPQ2ZiXKit61rmmUVNNm7XkFKO7rAtJpWqlyy0Wyf0MkRRSmsix7-zsGFL7a-8TDrZCfw7hc8O-tI9lC3Btl-WZqONQl22av4IAAD__9o8rfs">