mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 07:35:08 +00:00
pipeline: Avoid Twine
For some reason, Twine(int), when concatenated, may incorrectly become Twine(const unsigned long&) and cause a dereference crash.
This commit is contained in:
parent
80d06eb476
commit
f21fd7e5a2
@ -377,7 +377,7 @@ bool indexer_Parse(SemaManager *completion, WorkingFiles *wfiles,
|
|||||||
SmallString<256> msg;
|
SmallString<256> msg;
|
||||||
(Twine(deleted ? "delete " : "parse ") + path_to_index).toVector(msg);
|
(Twine(deleted ? "delete " : "parse ") + path_to_index).toVector(msg);
|
||||||
if (n_errs)
|
if (n_errs)
|
||||||
msg += (" error:" + Twine(n_errs) + " " + first_error).toStringRef(tmp);
|
msg += " error:" + std::to_string(n_errs) + ' ' + first_error;
|
||||||
if (LOG_V_ENABLED(1)) {
|
if (LOG_V_ENABLED(1)) {
|
||||||
msg += "\n ";
|
msg += "\n ";
|
||||||
for (const char *arg : entry.args)
|
for (const char *arg : entry.args)
|
||||||
|
Loading…
Reference in New Issue
Block a user