<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/90324>90324</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
llvm/lib/Support/GraphWriter.cpp:118: Clumsy string resize ?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dcb314
</td>
</tr>
</table>
<pre>
Static analyser cppcheck says:
llvm/lib/Support/GraphWriter.cpp:118:7: performance: Ineffective call of function 'substr' because a prefix of the string is assigned to itself. Use resize() or pop_back() instead. [uselessCallsSubstr]
Source code is
N = N.substr(0, std::min<std::size_t>(N.size(), 140));
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUUkGPmzwQ_TXDZfQhY0MCBw7Z5KPqZS9R1ePKmCG462DLY7ZNf30FyXb32gtiPJ557_k9zWwvM1EL1RNUp0wvafKxHUyvijLr_XBrz0kna1DP2t2YIpoQzETmFVnfGNQBxAnE4-vc2xVk52wPsjsvIfiYQHZfog7T92gTxdyEAOpQFDWowx7UAQPF0cerng2t5deZxpFMsm-ERjuHfsRxmU2yfkaQe156ThHkHnsyemFCjSHSaH-tN9NEyCna-YKW8aFuwOTRJiY35viNCSOx_U0ga5AN-ojBh5dem9fHiZ05kR5yhOppYXLEfNTO8fkOXZ0-Sz77JRpC4wdCy587-IygTvicv1OuBcgjchrWV1OHq51BHf-WK6WXBOp_kPVz_kFwnSlKsf01oJ7uy7OhVUOjGp1RW-yLUopq19TZ1CoziqHpy53Ymb4SYynVXtdjYyoxFGNfZraVQpailHtRF2VV50VBVOmdVnVZjEaNUAq6auvy1c3cx0tmmRdqG6FkmTndk-MtL1LO9BO3Jki5xie268x__XJhKIWznPhjS7LJUfuPEcGjW658ezf17hyC6rIlunZKKWwZlB3I7mLTtPS58RvAA2flE6L_QWaF2cgyyG4T8ycAAP__I43wfQ">