brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 43b7d78 Raw
31 lines · cpp
1// UNSUPPORTED: system-windows2// RUN: sed 's/placeholder_for_f/f/' %s > %t.cpp3// RUN: clang-tidy -checks=-*,modernize-use-override %t.cpp -- -std=c++11 | FileCheck -check-prefix=CHECK-SANITY %s4// RUN: not diff -U0 %s %t.cpp | %clang_tidy_diff -checks=-*,modernize-use-override -- -std=c++11 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-JMAX5// RUN: not diff -U0 %s %t.cpp | %clang_tidy_diff -checks=-*,modernize-use-override -quiet -- -std=c++11 2>&1 | FileCheck -check-prefix=CHECK-QUIET %s6// RUN: mkdir -p %t.dir/compilation-database-test/7// RUN: echo '[{"directory": "%t.dir", "command": "clang++ -o test.o -std=c++11 %t.cpp", "file": "%t.cpp"}]' > %t.dir/compilation-database-test/compile_commands.json8// RUN: not diff -U0 %s %t.cpp | %clang_tidy_diff -checks=-*,modernize-use-override -path %t.dir/compilation-database-test 2>&1 | FileCheck -check-prefix=CHECK %s9 10// RUN: not diff -U0 %s %t.cpp | %clang_tidy_diff -checks=-*,modernize-use-override -j 1 -- -std=c++11 2>&1 | FileCheck %s --check-prefix=CHECK-J111// CHECK-J1: Running clang-tidy in 1 threads...12struct A {13  virtual void f() {}14  virtual void g() {}15};16// CHECK-JMAX: Running clang-tidy in {{[1-9][0-9]*}} threads...17// CHECK-NOT: warning:18// CHECK-QUIET-NOT: warning:19struct B : public A {20  void placeholder_for_f() {}21// CHECK-SANITY: [[@LINE-1]]:8: warning: annotate this22// CHECK: [[@LINE-2]]:8: warning: annotate this23// CHECK-QUIET: [[@LINE-3]]:8: warning: annotate this24  void g() {}25// CHECK-SANITY: [[@LINE-1]]:8: warning: annotate this26// CHECK-NOT: warning:27// CHECK-QUIET-NOT: warning:28};29// CHECK-SANITY-NOT: Suppressed30// CHECK-QUIET-NOT: Suppressed31