<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/91212>91212</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
lldb/tools/debugserver/source/JSON.cpp: 4 * Clumsy string output
</td>
</tr>
<tr>
<th>Labels</th>
<td>
lldb,
code-quality
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dcb314
</td>
</tr>
</table>
<pre>
Static analyser cppcheck says:
lldb/tools/debugserver/source/JSON.cpp:398:19: performance: Passing the result of c_str() to a stream is slow and redundant. [stlcstrStream]
Source code is
error << "error: got exponent character but no exponent digits at "
"offset in float value \""
<< value.c_str() << "\"";
Some duplicates:
lldb/tools/debugserver/source/JSON.cpp:408:64: performance: Passing the result of c_str() to a stream is slow and redundant. [stlcstrStream]
lldb/tools/debugserver/source/JSON.cpp:420:54: performance: Passing the result of c_str() to a stream is slow and redundant. [stlcstrStream]
lldb/tools/debugserver/source/JSON.cpp:46:13: performance: Passing the result of c_str() to a stream is slow and redundant. [stlcstrStream]
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUlMGO2zgMhp-GvhATyJIdxwcfMgl82MPuAnmAhSzTibaK5UrUtHn7Qm7QpOhpUGCA6mBDEP3r40_SOkZ7nok6qF-hPhY68cWHbjSDKqti8OOtO7Fma1DP2t0iBTTLYi5kPmHUtwhqD-II4v50bhxA9uy9iyD7kYZ0jhTeKIDso0_BEMj-r9M_f2_MsoDaq3YHal-2oPa4UJh8uOrZUN7-m9nmM_KFMFBMjtFPaP6LHEDuQLbIHjVGDqSvaCNG57-gnkcMNKZ51DNvEOrXyM5EDqc1DurjM-9pRULjR0Ibn0_waVEIPiCoA6gDgpTrPiOePSN9XfxMM6O56KANU8AhMc7-cTLas-WImvPHd3mQ0k9TJEY74-S8ZnzTLhFCfchRPwJ_WXeONXrzbMcD8KGhXn9O90o4psVZo5l-u3iVyMXbVh9evPeTSgFqX_8JpNs8D-rDQYuxU2OrWl1QVzZlLUQtGlFcOiHHchBKVcbstqKiRlTGDE2z3aq63k1tYTspZCVqsS2rsqnFZtwqJVvTTMZUzVRrqARdtXUb596uGx_OhY0xUdeWspSF0wO5uP5_pPxulwSZ-zdP5cvnpJ3l29rUxyJ0WeMlmwiVcDZyfKiyZUfdux3HCkHu8eDSNd6yfdlkn3hJXKTgugvzso6K7EH2Z8uXNGyMv4Ls89X318sS_P9kGGS_ZpfvXhP8FgAA___BcrLe">