1// RUN: %run_clang_tidy --help
2// RUN: rm -rf %t
3// RUN: mkdir %t
4// RUN: echo "[{\"directory\":\".\",\"command\":\"clang++ -c %/t/test.cpp\",\"file\":\"%/t/test.cpp\"}]" | sed -e 's/\\/\\\\/g' > %t/compile_commands.json
5// RUN: echo "Checks: '-*,modernize-use-auto'" > %t/.clang-tidy
6// RUN: echo "WarningsAsErrors: '*'" >> %t/.clang-tidy
7// RUN: echo "CheckOptions:" >> %t/.clang-tidy
8// RUN: echo " modernize-use-auto.MinTypeNameLength: '0'" >> %t/.clang-tidy
9// RUN: cp "%s" "%t/test.cpp"
10// RUN: cd "%t"
11// RUN: not %run_clang_tidy "test.cpp"
12
13int main()
14{
15 int* x = new int();
16 delete x;
17}
18

source code of clang-tools-extra/test/clang-tidy/infrastructure/run-clang-tidy.cpp