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 "  - key:             modernize-use-auto.MinTypeNameLength" >> %t/.clang-tidy
9 // RUN: echo "    value:           '0'" >> %t/.clang-tidy
10 // RUN: cp "%s" "%t/test.cpp"
11 // RUN: cd "%t"
12 // RUN: not %run_clang_tidy "test.cpp"
13 
main()14 int main()
15 {
16   int* x = new int();
17   delete x;
18 }
19