brintos

brintos / llvm-project-archived public Read only

0
0
Text · 848 B · 6337686 Raw
22 lines · cpp
1// RUN: %run_clang_tidy --help2// RUN: rm -rf %t3// RUN: mkdir %t4// RUN: echo "[{\"directory\":\".\",\"command\":\"clang++ -c %/t/test.cpp\",\"file\":\"%/t/test.cpp\"}]" | sed -e 's/\\/\\\\/g' > %t/compile_commands.json5// RUN: echo "Checks: '-*,modernize-use-auto'" > %t/.clang-tidy6// RUN: echo "WarningsAsErrors: '*'" >> %t/.clang-tidy7// RUN: echo "CheckOptions:" >> %t/.clang-tidy8// RUN: echo "  modernize-use-auto.MinTypeNameLength: '0'" >> %t/.clang-tidy9// RUN: cp "%s" "%t/test.cpp"10// RUN: cd "%t"11// RUN: not %run_clang_tidy "test.cpp" 2>&1 | FileCheck %s --check-prefix=CHECK-JMAX12// CHECK-JMAX: Running clang-tidy in {{[1-9][0-9]*}} threads for13 14// RUN: not %run_clang_tidy -j 1 "test.cpp" 2>&1 | FileCheck %s --check-prefix=CHECK-J115// CHECK-J1: Running clang-tidy in 1 threads for16 17int main()18{19  int* x = new int();20  delete x;21}22