summaryrefslogtreecommitdiffstats
path: root/tools/clang-tidy/test/performance-inefficient-string-concatenation.cpp
blob: 5a5860f2154ead32aabdbff293c2a7433530e195 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "structures.h"

extern void fstring(std::string);

void foo() {
  std::string mystr1, mystr2;
  auto myautostr1 = mystr1;
  auto myautostr2 = mystr2;

  for (int i = 0; i < 10; ++i) {
    fstring(mystr1 + mystr2 + mystr1);
  }
}