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

    <tr>
        <th>Summary</th>
        <td>
            Use `OpAsmParser::parseCommaSeparatedList` to clean up manual parsing loops
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            mlir:core
      </td>
    </tr>

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

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

<pre>
    We have a lot of legacy code in the MLIR tree that could be using parseCommaSeparatedList to clean up code, e.g. `ToyDialect::parseType` which is manually parsing the <> delimiters and all the elements, things like parseLinearClause in OpenMPDialect.cpp etc.

There are a lot of these, they are pretty easy to find by grepping for patterns like `while (succeeded(parser.parseOptionalComma()))`
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxlkUGPmzAQhX8NXEZFrAkhHDhss41UaVe7alP1PNgTcGuwZZut-PcdnLSNVMnCth5-882b3qq1-04w4jsBgrER7AUMDShXkFYR6BniSPDy_PkLRE_EN4wsLUZBT7AEPQ_g0Ac62mnCr8RnjKSedYgQLUhDOMPiklsmjkDFUEC2L892fdJoSMaseuSVPM6rI9bg16jlCDrAhPOCxqypxFZqg8mqY1Z9AkVGTzqSD4CzAv4tqWRoojmGrVgc-U0Ao3_SFfJZz4T-aHAJqbdXR_PL2w2kkM4BRVlk5VNWPl6_55E8Z-Pv8uEqga72tCbJeYpxBcKwbk1fNPP0KwyenNuoL9Zz_cis842Gu-QmDR_EISxSEilSfE6Uvkjbq4vazmhSsqxlor2tfZmrrlJt1WIedTTUfQvJ89U9huktedzF-v9otpDvp3PN-W_KxloX8sWbbozRhc1KnHgNOo5LX0g78cWY9z_bB-ftj22U4qRDWIjDP9X1Q1PlY9fQQTUHKfdN3VStqg71vqW6RmrKvlVY5QZ7MqHL6o-ZEJPRG7m0nhMWWf2U606UQpQ7cXg47EqxL0pSbVv1KB5a7C9ln-1KmlCbYiMprB9y3yWofhkCi4b7Df9EDEEPM1EqyP64xNHyCx7PTD5P_F2C_w2HwgvI">