From cef84cf2c2b6f29771d530893c8281ad36846456 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 27 Sep 2020 19:02:45 -0700 Subject: [PATCH] clang-tidy: use append Found with performance-inefficient-string-concatenation Signed-off-by: Rosen Penev --- src/builtin_type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/builtin_type.cpp b/src/builtin_type.cpp index a5a30b2e7..57f930f7b 100644 --- a/src/builtin_type.cpp +++ b/src/builtin_type.cpp @@ -147,7 +147,7 @@ maybe_t builtin_type(parser_t &parser, io_streams_t &streams, wchar_t **arg int line_number = function_get_definition_lineno(name); wcstring comment; append_format(comment, L"# Defined in %ls @ line %d\n", path, line_number); - def = comment + def; + def = comment.append(def); } if (!streams.out_is_redirected && isatty(STDOUT_FILENO)) { std::vector colors;