1 .. title:: clang-tidy - abseil-redundant-strcat-calls
3 abseil-redundant-strcat-calls
4 =============================
6 Suggests removal of unnecessary calls to ``absl::StrCat`` when the result is
7 being passed to another call to ``absl::StrCat`` or ``absl::StrAppend``.
9 The extra calls cause unnecessary temporary strings to be constructed. Removing
10 them makes the code smaller and faster.
16 std::string s = absl::StrCat("A", absl::StrCat("B", absl::StrCat("C", "D")));
19 std::string s = absl::StrCat("A", "B", "C", "D");
22 absl::StrAppend(&s, absl::StrCat("E", "F", "G"));
25 absl::StrAppend(&s, "E", "F", "G");