<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/92054>92054</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Factor `Error` and `Expected` boilerplate return-macros
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
mtrofin
</td>
</tr>
</table>
<pre>
Examples: [`RETURN_IF_ERROR` and `ASSIGN_OR_RETURN`](https://github.com/llvm/llvm-project/blob/c3028a230557405b0f10bdd7d450f7f92747bbe3/llvm/tools/llvm-rc/ResourceScriptParser.cpp#L20-L30) or [these](https://github.com/llvm/llvm-project/blob/c3028a230557405b0f10bdd7d450f7f92747bbe3/llvm/unittests/tools/llvm-profdata/OutputSizeLimitTest.cpp#L56-L70) with a slightly different name.
The idea is to place them in Error.h
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8kkFr5DgQhX-NfBHdyJJlxwcfsqS9BJpkcWfPTckqtzXIlpHKk2R-_WCHkGFuc5mLBFLxeF-9Bym524zYMP0P0w8ZrDSG2EwUw-DmzAT73pzeYFo8Jqbu-TZWiu708n_3dH1sr6eue-5YKTjMlrNS3F8uj_8-XZ-768cMKwXTD0zejUTLpsBky2R7czSu5tiHicnW---f12GJ4Rv2xGRrfDBMtr0S8g6kElpXhdBGDLkw1la20GKohlpWRWUMqi8dCsGnT73YM9l2mMIae7z00S30H8SE8dgvC5PqLMXhrASTNQ9xo6MRE_5ty-vsiDBR-t3-EsNggYDJ9nmlZaWL-4FnNzl6wUSfDLo8nKud4dXRyIEn724j-Xdu3TBgxJn4DBMemXhg4v7jfBmRO4vAXeIU-OKhR04jTtzN_BRjiMcxs42ytaohwyavcl0WdalUNjY4lHUO1uZgKmGtlYBGWwVgDFSlsJlrpJCF0HkhcimUOkqA8m4Qle6tViAkKwRO4Pxx4zyGeMtcSis2tRS6yDwY9GkvpZQzvvL9k0m5dTQ2-27MekusEN4lSl8q5Mhj00JPW56l2El-KejpbcGe0G5PJjiPcfFAyCPSGufDBH0MKVujb_44_t3jFt3O8DMAAP__xs8Pkw">