summaryrefslogtreecommitdiffstats
path: root/tools/clang-tidy/test/modernize-shrink-to-fit.cpp
blob: c545a517a366991801400bf7d915d785c88fa8cb (plain)
1
2
3
4
5
6
7
8
9
10
#include "structures.h"

void f() {
  std::vector<int> v;

  std::vector<int>(v).swap(v);

  std::vector<int> &vref = v;
  std::vector<int>(vref).swap(vref);
}