<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/108566>108566</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[[ minsize ]] does not propagate to inlined functions
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
psiha
</td>
</tr>
</table>
<pre>
...unless, counterintuitively, combined with [[ flatten ]]
https://godbolt.org/z/s14W7W6Gf
This is demonstrated by case 1.
Case 2 is another problem I stumbled upon trying to reproduce this on godbolt - which uses string_views (as in my original problem) - but on godbolt instead of getting unwanted unrolled code Clang was somehow unable to inline trivial std::ranges wrappers and for some reason thinks those same wrappers can throw exceptions? (though this might be an STL implementation issue).
Finally - trying to workaround this issue I could not use #pragma clang loop unroll( disable ) when using STL algorithms for the obvious reason being that pragma requiring to 'see' the loop directly following - can you add a pragma or an attribute or some other mechanism with which one could disable loop unrolling for a block of functions or a block of code or for an entire function (also affecting any inlined code).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcVMuu4zYM_RplQyRwlPcii_tAigG66wCzLGiLttUri65Ixc18fSEn6b1TwLABmY9zDo-IIr6LRGezezW79wVm7TmdR_E9Lmp2t_NqtcoxkIixb9BwjkrJR81e_ZXC7X461D6Sg8lrD3OlV2gDqlIEs3svT_VuqpdedRSzeTH2YuylY1dz0BWnztjLT2Mvst7-OPzY_9bew-_v770X8AKOBo6iCZUc1DdoUAjWq6-hb-XIlmCMrD0lGBPXgQb4BqJ5qAM5yCNH0HTzsQNlSDQmdrkh0NKIIzxwwRKm3jc9ZCEB0eRj9-fV0yRg7BEFfIThBpx85yOGZytjT7CEOuvXUj6KEjrgFjpSLa1znDAWKjkmDgVYw47gLWDsYEIB4YF6niBHrAMVqD4GHwk0-avHAKKuaLl5SRg7EpgSjiOlQt5By2muAIlQCuHexw8B7VkIBAf6DG-w_E48Af3T0Kieo5jNpbDUnnPX35UZfNcr1AQY4Y_vv4MfxkADRcWSAV4kk7GnXwZyKcqEGyy_CD5x-sDEObp73TkRvhVvBQeRtQgOxm7GhN2A0MyKBObxIZWxR3BeZlWK2lNPEbKU8gUXho6T136QWQTtCbi-es7y1KKmGUqPCo8eif7OPj0AGnsQImMPc-7c2PlEjYYbtBwCTyVwOet24wzoHOCzEqeiD6omX2cleI7hbseBmh6jl-F-Ve7-4kgP8k9WX8iWVoUGQh24-SgOanNs5iHBr-ezfzjdwyNQVJ_ov-jZtEEYsG2pmS2I8fbw1N18ZXoLd9640-aECzqvD3ZvN4dNtV30583xWFXbusFDtd7X1e6Ep_22bdwRbdNu7GHhz7ay2-q03qy3dr3drtaubitXud1p1xKu12Zb0YA-rEK4DuXWL-bRn9fVcbffLwLWFGReRNZGmp6OsmUvpXNJWta5E7OtgheVzzLqNTw22CsMPor_SY-9A45JZlONiUfsUL_cJPcp5SKncP7fevLa53rV8GDspfR6fJZj4r-oUWMvM0Ix9vKgcD3bfwMAAP__k2nTHg">