diff options
author | Manuel Klimek <klimek@google.com> | 2015-10-22 11:31:44 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2015-10-22 11:31:44 +0000 |
commit | b91bee06deefe77a51d0a39b06c086df19aec82c (patch) | |
tree | 45c6815c0a378b521540dd7d7505521dc74f6285 | |
parent | fbfa7a1e14b5e5c141775850d2aa731fc5cac2dc (diff) | |
download | bcm5719-llvm-b91bee06deefe77a51d0a39b06c086df19aec82c.tar.gz bcm5719-llvm-b91bee06deefe77a51d0a39b06c086df19aec82c.zip |
Add %check_clang_tidy and %clang_tidy_diff.
With this, site specific lit configs can inject parameters into the
test scripts if they need site specific parameters.
Next up: enable check_clang_tidy to take a resource dir to enable
non-standard locations for builtin includes.
llvm-svn: 251010
82 files changed, 91 insertions, 82 deletions
diff --git a/clang-tools-extra/test/clang-tidy/cert-setlongjmp.cpp b/clang-tools-extra/test/clang-tidy/cert-setlongjmp.cpp index b5b5b1eeb15..e0cba9070c0 100644 --- a/clang-tools-extra/test/clang-tidy/cert-setlongjmp.cpp +++ b/clang-tools-extra/test/clang-tidy/cert-setlongjmp.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s cert-err52-cpp %t -- -std=c++11 +// RUN: %check_clang_tidy %s cert-err52-cpp %t -- -std=c++11 typedef void *jmp_buf; extern int __setjmpimpl(jmp_buf); diff --git a/clang-tools-extra/test/clang-tidy/cert-variadic-function-def.cpp b/clang-tools-extra/test/clang-tidy/cert-variadic-function-def.cpp index 2c1420b9e36..6b2421b82fa 100644 --- a/clang-tools-extra/test/clang-tidy/cert-variadic-function-def.cpp +++ b/clang-tools-extra/test/clang-tidy/cert-variadic-function-def.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s cert-dcl50-cpp %t +// RUN: %check_clang_tidy %s cert-dcl50-cpp %t // Variadic function definitions are diagnosed. void f1(int, ...) {} diff --git a/clang-tools-extra/test/clang-tidy/check_clang_tidy.py b/clang-tools-extra/test/clang-tidy/check_clang_tidy.py index b6c82d9a731..101553cd957 100755 --- a/clang-tools-extra/test/clang-tidy/check_clang_tidy.py +++ b/clang-tools-extra/test/clang-tidy/check_clang_tidy.py @@ -20,7 +20,7 @@ Usage: [optional clang-tidy arguments] Example: - // RUN: %python %S/check_clang_tidy.py %s llvm-include-order %t -- -isystem $(dirname %s)/Inputs/Headers + // RUN: %check_clang_tidy %s llvm-include-order %t -- -isystem $(dirname %s)/Inputs/Headers """ import re diff --git a/clang-tools-extra/test/clang-tidy/clang-tidy-diff.cpp b/clang-tools-extra/test/clang-tidy/clang-tidy-diff.cpp index f02419577fb..88a0c0170f5 100644 --- a/clang-tools-extra/test/clang-tidy/clang-tidy-diff.cpp +++ b/clang-tools-extra/test/clang-tidy/clang-tidy-diff.cpp @@ -1,6 +1,6 @@ // RUN: sed 's/placeholder_for_f/f/' %s > %t.cpp // RUN: clang-tidy -checks=-*,modernize-use-override %t.cpp -- -std=c++11 | FileCheck -check-prefix=CHECK-SANITY %s -// RUN: not diff -U0 %s %t.cpp | %python %S/../../clang-tidy/tool/clang-tidy-diff.py -checks=-*,modernize-use-override -- -std=c++11 2>&1 | FileCheck %s +// RUN: not diff -U0 %s %t.cpp | %clang_tidy_diff -checks=-*,modernize-use-override -- -std=c++11 2>&1 | FileCheck %s struct A { virtual void f() {} virtual void g() {} diff --git a/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp b/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp index b765f00bd37..c8fea8052e5 100644 --- a/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp +++ b/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s cppcoreguidelines-pro-bounds-pointer-arithmetic %t +// RUN: %check_clang_tidy %s cppcoreguidelines-pro-bounds-pointer-arithmetic %t enum E { ENUM_LITERAL = 1 diff --git a/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-const-cast.cpp b/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-const-cast.cpp index 6221c049f64..2d32e13723a 100644 --- a/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-const-cast.cpp +++ b/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-const-cast.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s cppcoreguidelines-pro-type-const-cast %t +// RUN: %check_clang_tidy %s cppcoreguidelines-pro-type-const-cast %t const int *i; int *j; diff --git a/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-reinterpret-cast.cpp b/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-reinterpret-cast.cpp index 02822325ca0..54208102e6f 100644 --- a/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-reinterpret-cast.cpp +++ b/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-reinterpret-cast.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s cppcoreguidelines-pro-type-reinterpret-cast %t +// RUN: %check_clang_tidy %s cppcoreguidelines-pro-type-reinterpret-cast %t int i = 0; void *j; diff --git a/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-static-cast-downcast.cpp b/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-static-cast-downcast.cpp index 4e31f6f4499..7a6c027ec47 100644 --- a/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-static-cast-downcast.cpp +++ b/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-static-cast-downcast.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s cppcoreguidelines-pro-type-static-cast-downcast %t +// RUN: %check_clang_tidy %s cppcoreguidelines-pro-type-static-cast-downcast %t class Base { }; diff --git a/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-union-access.cpp b/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-union-access.cpp index 2596b443501..6abc22b9e43 100644 --- a/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-union-access.cpp +++ b/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-union-access.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s cppcoreguidelines-pro-type-union-access %t +// RUN: %check_clang_tidy %s cppcoreguidelines-pro-type-union-access %t union U { bool union_member1; diff --git a/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-vararg.cpp b/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-vararg.cpp index b2b47848779..4df1c37a1ff 100644 --- a/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-vararg.cpp +++ b/clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-vararg.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s cppcoreguidelines-pro-type-vararg %t +// RUN: %check_clang_tidy %s cppcoreguidelines-pro-type-vararg %t void f(int i); void f_vararg(int i, ...); diff --git a/clang-tools-extra/test/clang-tidy/google-build-explicit-make-pair.cpp b/clang-tools-extra/test/clang-tidy/google-build-explicit-make-pair.cpp index ac51ce6ef14..6dcd357f511 100644 --- a/clang-tools-extra/test/clang-tidy/google-build-explicit-make-pair.cpp +++ b/clang-tools-extra/test/clang-tidy/google-build-explicit-make-pair.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s google-build-explicit-make-pair %t +// RUN: %check_clang_tidy %s google-build-explicit-make-pair %t namespace std { template <class T1, class T2> diff --git a/clang-tools-extra/test/clang-tidy/google-explicit-constructor.cpp b/clang-tools-extra/test/clang-tidy/google-explicit-constructor.cpp index 0bc7040c516..02a16008725 100644 --- a/clang-tools-extra/test/clang-tidy/google-explicit-constructor.cpp +++ b/clang-tools-extra/test/clang-tidy/google-explicit-constructor.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s google-explicit-constructor %t +// RUN: %check_clang_tidy %s google-explicit-constructor %t namespace std { typedef decltype(sizeof(int)) size_t; diff --git a/clang-tools-extra/test/clang-tidy/google-overloaded-unary-and.cpp b/clang-tools-extra/test/clang-tidy/google-overloaded-unary-and.cpp index ab1312f55ee..16893d2725a 100644 --- a/clang-tools-extra/test/clang-tidy/google-overloaded-unary-and.cpp +++ b/clang-tools-extra/test/clang-tidy/google-overloaded-unary-and.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s google-runtime-operator %t +// RUN: %check_clang_tidy %s google-runtime-operator %t struct Foo { void *operator&(); diff --git a/clang-tools-extra/test/clang-tidy/google-readability-casting.c b/clang-tools-extra/test/clang-tidy/google-readability-casting.c index b195667b6dd..0d148137ac2 100644 --- a/clang-tools-extra/test/clang-tidy/google-readability-casting.c +++ b/clang-tools-extra/test/clang-tidy/google-readability-casting.c @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s google-readability-casting %t -- -x c +// RUN: %check_clang_tidy %s google-readability-casting %t -- -x c // The testing script always adds .cpp extension to the input file name, so we // need to run clang-tidy directly in order to verify handling of .c files: // RUN: clang-tidy --checks=-*,google-readability-casting %s -- -x c++ | FileCheck %s -check-prefix=CHECK-MESSAGES -implicit-check-not='{{warning|error}}:' diff --git a/clang-tools-extra/test/clang-tidy/google-readability-casting.cpp b/clang-tools-extra/test/clang-tidy/google-readability-casting.cpp index 50c3cb75ad1..5b9e16bdd14 100644 --- a/clang-tools-extra/test/clang-tidy/google-readability-casting.cpp +++ b/clang-tools-extra/test/clang-tidy/google-readability-casting.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s google-readability-casting %t +// RUN: %check_clang_tidy %s google-readability-casting %t bool g() { return false; } diff --git a/clang-tools-extra/test/clang-tidy/google-readability-namespace-comments.cpp b/clang-tools-extra/test/clang-tidy/google-readability-namespace-comments.cpp index ab5391b3cce..1996552214f 100644 --- a/clang-tools-extra/test/clang-tidy/google-readability-namespace-comments.cpp +++ b/clang-tools-extra/test/clang-tidy/google-readability-namespace-comments.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s google-readability-namespace-comments %t +// RUN: %check_clang_tidy %s google-readability-namespace-comments %t namespace n1 { namespace n2 { diff --git a/clang-tools-extra/test/clang-tidy/google-readability-todo.cpp b/clang-tools-extra/test/clang-tidy/google-readability-todo.cpp index d2e3b6c2cc3..967b15cc46f 100644 --- a/clang-tools-extra/test/clang-tidy/google-readability-todo.cpp +++ b/clang-tools-extra/test/clang-tidy/google-readability-todo.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s google-readability-todo %t -config="{User: 'some user'}" -- +// RUN: %check_clang_tidy %s google-readability-todo %t -config="{User: 'some user'}" -- // TODOfix this1 // CHECK-MESSAGES: [[@LINE-1]]:1: warning: missing username/bug in TODO diff --git a/clang-tools-extra/test/clang-tidy/google-runtime-int-std.cpp b/clang-tools-extra/test/clang-tidy/google-runtime-int-std.cpp index 8efd504672d..0b3c895ff35 100644 --- a/clang-tools-extra/test/clang-tidy/google-runtime-int-std.cpp +++ b/clang-tools-extra/test/clang-tidy/google-runtime-int-std.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s google-runtime-int %t \ +// RUN: %check_clang_tidy %s google-runtime-int %t \ // RUN: -config='{CheckOptions: [ \ // RUN: {key: google-runtime-int.UnsignedTypePrefix, value: "std::uint"}, \ // RUN: {key: google-runtime-int.SignedTypePrefix, value: "std::int"}, \ diff --git a/clang-tools-extra/test/clang-tidy/google-runtime-int.cpp b/clang-tools-extra/test/clang-tidy/google-runtime-int.cpp index 6529ffcaa19..bcf6eb60d0d 100644 --- a/clang-tools-extra/test/clang-tidy/google-runtime-int.cpp +++ b/clang-tools-extra/test/clang-tidy/google-runtime-int.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s google-runtime-int %t +// RUN: %check_clang_tidy %s google-runtime-int %t long a(); // CHECK-MESSAGES: [[@LINE-1]]:1: warning: consider replacing 'long' with 'int{{..}}' diff --git a/clang-tools-extra/test/clang-tidy/google-runtime-member-string-references.cpp b/clang-tools-extra/test/clang-tidy/google-runtime-member-string-references.cpp index 09146456df4..b153149ca39 100644 --- a/clang-tools-extra/test/clang-tidy/google-runtime-member-string-references.cpp +++ b/clang-tools-extra/test/clang-tidy/google-runtime-member-string-references.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s google-runtime-member-string-references %t +// RUN: %check_clang_tidy %s google-runtime-member-string-references %t namespace std { template<typename T> diff --git a/clang-tools-extra/test/clang-tidy/google-runtime-memset-zero-length.cpp b/clang-tools-extra/test/clang-tidy/google-runtime-memset-zero-length.cpp index 88c38e6f945..db75cb0fedd 100644 --- a/clang-tools-extra/test/clang-tidy/google-runtime-memset-zero-length.cpp +++ b/clang-tools-extra/test/clang-tidy/google-runtime-memset-zero-length.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s google-runtime-memset %t +// RUN: %check_clang_tidy %s google-runtime-memset %t void *memset(void *, int, __SIZE_TYPE__); diff --git a/clang-tools-extra/test/clang-tidy/llvm-include-order.cpp b/clang-tools-extra/test/clang-tidy/llvm-include-order.cpp index 6be5d0523e1..d323db2b647 100644 --- a/clang-tools-extra/test/clang-tidy/llvm-include-order.cpp +++ b/clang-tools-extra/test/clang-tidy/llvm-include-order.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s llvm-include-order %t -- -isystem %S/Inputs/Headers +// RUN: %check_clang_tidy %s llvm-include-order %t -- -isystem %S/Inputs/Headers // CHECK-MESSAGES: [[@LINE+2]]:1: warning: #includes are not sorted properly #include "j.h" diff --git a/clang-tools-extra/test/clang-tidy/llvm-twine-local.cpp b/clang-tools-extra/test/clang-tidy/llvm-twine-local.cpp index a57110954ae..aa99420272f 100644 --- a/clang-tools-extra/test/clang-tidy/llvm-twine-local.cpp +++ b/clang-tools-extra/test/clang-tidy/llvm-twine-local.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s llvm-twine-local %t +// RUN: %check_clang_tidy %s llvm-twine-local %t namespace llvm { class Twine { diff --git a/clang-tools-extra/test/clang-tidy/misc-argument-comment.cpp b/clang-tools-extra/test/clang-tidy/misc-argument-comment.cpp index 93fcb121543..93217b0f57a 100644 --- a/clang-tools-extra/test/clang-tidy/misc-argument-comment.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-argument-comment.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-argument-comment %t +// RUN: %check_clang_tidy %s misc-argument-comment %t // FIXME: clang-tidy should provide a -verify mode to make writing these checks // easier and more accurate. diff --git a/clang-tools-extra/test/clang-tidy/misc-assert-side-effect.cpp b/clang-tools-extra/test/clang-tidy/misc-assert-side-effect.cpp index e995aa3e9a2..a87418c959d 100644 --- a/clang-tools-extra/test/clang-tidy/misc-assert-side-effect.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-assert-side-effect.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-assert-side-effect %t -config="{CheckOptions: [{key: misc-assert-side-effect.CheckFunctionCalls, value: 1}, {key: misc-assert-side-effect.AssertMacros, value: 'assert,assert2,my_assert,convoluted_assert'}]}" -- -fexceptions +// RUN: %check_clang_tidy %s misc-assert-side-effect %t -config="{CheckOptions: [{key: misc-assert-side-effect.CheckFunctionCalls, value: 1}, {key: misc-assert-side-effect.AssertMacros, value: 'assert,assert2,my_assert,convoluted_assert'}]}" -- -fexceptions //===--- assert definition block ------------------------------------------===// int abort() { return 0; } diff --git a/clang-tools-extra/test/clang-tidy/misc-assign-operator-signature.cpp b/clang-tools-extra/test/clang-tidy/misc-assign-operator-signature.cpp index c0dacc7cf52..1b85d4bf0a1 100644 --- a/clang-tools-extra/test/clang-tidy/misc-assign-operator-signature.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-assign-operator-signature.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-assign-operator-signature %t +// RUN: %check_clang_tidy %s misc-assign-operator-signature %t struct Good { Good& operator=(const Good&); diff --git a/clang-tools-extra/test/clang-tidy/misc-bool-pointer-implicit-conversion.cpp b/clang-tools-extra/test/clang-tidy/misc-bool-pointer-implicit-conversion.cpp index 147b3722ed0..bb71ce193ac 100644 --- a/clang-tools-extra/test/clang-tidy/misc-bool-pointer-implicit-conversion.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-bool-pointer-implicit-conversion.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-bool-pointer-implicit-conversion %t +// RUN: %check_clang_tidy %s misc-bool-pointer-implicit-conversion %t bool *SomeFunction(); void SomeOtherFunction(bool*); diff --git a/clang-tools-extra/test/clang-tidy/misc-inaccurate-erase.cpp b/clang-tools-extra/test/clang-tidy/misc-inaccurate-erase.cpp index 2e86638fdef..4c750031905 100644 --- a/clang-tools-extra/test/clang-tidy/misc-inaccurate-erase.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-inaccurate-erase.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-inaccurate-erase %t +// RUN: %check_clang_tidy %s misc-inaccurate-erase %t namespace std { template <typename T> struct vec_iterator { diff --git a/clang-tools-extra/test/clang-tidy/misc-inefficient-algorithm.cpp b/clang-tools-extra/test/clang-tidy/misc-inefficient-algorithm.cpp index 9bc5628dabc..df962c9195c 100644 --- a/clang-tools-extra/test/clang-tidy/misc-inefficient-algorithm.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-inefficient-algorithm.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-inefficient-algorithm %t +// RUN: %check_clang_tidy %s misc-inefficient-algorithm %t namespace std { template <typename T> struct less { diff --git a/clang-tools-extra/test/clang-tidy/misc-macro-parentheses.cpp b/clang-tools-extra/test/clang-tidy/misc-macro-parentheses.cpp index 6959ee77f83..123841a328e 100644 --- a/clang-tools-extra/test/clang-tidy/misc-macro-parentheses.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-macro-parentheses.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-macro-parentheses %t +// RUN: %check_clang_tidy %s misc-macro-parentheses %t #define BAD1 -1 // CHECK-MESSAGES: :[[@LINE-1]]:27: warning: macro replacement list should be enclosed in parentheses [misc-macro-parentheses] diff --git a/clang-tools-extra/test/clang-tidy/misc-move-constructor-init.cpp b/clang-tools-extra/test/clang-tidy/misc-move-constructor-init.cpp index e3c01747ab2..3ac93ef495d 100644 --- a/clang-tools-extra/test/clang-tidy/misc-move-constructor-init.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-move-constructor-init.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-move-constructor-init %t -- -std=c++11 -isystem %S/Inputs/Headers +// RUN: %check_clang_tidy %s misc-move-constructor-init %t -- -std=c++11 -isystem %S/Inputs/Headers #include <s.h> diff --git a/clang-tools-extra/test/clang-tidy/misc-new-delete-overloads-sized-dealloc.cpp b/clang-tools-extra/test/clang-tidy/misc-new-delete-overloads-sized-dealloc.cpp index 736ab94b246..4dc4adeee71 100644 --- a/clang-tools-extra/test/clang-tidy/misc-new-delete-overloads-sized-dealloc.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-new-delete-overloads-sized-dealloc.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-new-delete-overloads %t -- -std=c++14 -fsized-deallocation +// RUN: %check_clang_tidy %s misc-new-delete-overloads %t -- -std=c++14 -fsized-deallocation typedef decltype(sizeof(int)) size_t; diff --git a/clang-tools-extra/test/clang-tidy/misc-new-delete-overloads.cpp b/clang-tools-extra/test/clang-tidy/misc-new-delete-overloads.cpp index d893ada84f5..42f2a456214 100644 --- a/clang-tools-extra/test/clang-tidy/misc-new-delete-overloads.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-new-delete-overloads.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-new-delete-overloads %t -- -std=c++14 +// RUN: %check_clang_tidy %s misc-new-delete-overloads %t -- -std=c++14 typedef decltype(sizeof(int)) size_t; diff --git a/clang-tools-extra/test/clang-tidy/misc-noexcept-move-constructor.cpp b/clang-tools-extra/test/clang-tidy/misc-noexcept-move-constructor.cpp index bb66471ab73..289cc131e3e 100644 --- a/clang-tools-extra/test/clang-tidy/misc-noexcept-move-constructor.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-noexcept-move-constructor.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-noexcept-move-constructor %t +// RUN: %check_clang_tidy %s misc-noexcept-move-constructor %t class A { A(A &&); diff --git a/clang-tools-extra/test/clang-tidy/misc-non-copyable-objects.c b/clang-tools-extra/test/clang-tidy/misc-non-copyable-objects.c index 4fe10e627ba..98e52b95f69 100644 --- a/clang-tools-extra/test/clang-tidy/misc-non-copyable-objects.c +++ b/clang-tools-extra/test/clang-tidy/misc-non-copyable-objects.c @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-non-copyable-objects %t
+// RUN: %check_clang_tidy %s misc-non-copyable-objects %t
typedef struct FILE {} FILE;
typedef struct pthread_cond_t {} pthread_cond_t;
diff --git a/clang-tools-extra/test/clang-tidy/misc-non-copyable-objects.cpp b/clang-tools-extra/test/clang-tidy/misc-non-copyable-objects.cpp index 2f18f6f128e..3d716f4ffe8 100644 --- a/clang-tools-extra/test/clang-tidy/misc-non-copyable-objects.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-non-copyable-objects.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-non-copyable-objects %t +// RUN: %check_clang_tidy %s misc-non-copyable-objects %t namespace std { typedef struct FILE {} FILE; diff --git a/clang-tools-extra/test/clang-tidy/misc-repeated-side-effects-in-macro.c b/clang-tools-extra/test/clang-tidy/misc-repeated-side-effects-in-macro.c index e83caaecee2..a23dd0cce04 100644 --- a/clang-tools-extra/test/clang-tidy/misc-repeated-side-effects-in-macro.c +++ b/clang-tools-extra/test/clang-tidy/misc-repeated-side-effects-in-macro.c @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-macro-repeated-side-effects %t +// RUN: %check_clang_tidy %s misc-macro-repeated-side-effects %t #define badA(x,y) ((x)+((x)+(y))+(y)) void bad(int ret, int a, int b) { diff --git a/clang-tools-extra/test/clang-tidy/misc-sizeof-container.cpp b/clang-tools-extra/test/clang-tidy/misc-sizeof-container.cpp index fc84b2b0af6..ebb8bdf3e44 100644 --- a/clang-tools-extra/test/clang-tidy/misc-sizeof-container.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-sizeof-container.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-sizeof-container %t -- -std=c++11 -target x86_64-unknown-unknown +// RUN: %check_clang_tidy %s misc-sizeof-container %t -- -std=c++11 -target x86_64-unknown-unknown namespace std { diff --git a/clang-tools-extra/test/clang-tidy/misc-static-assert.c b/clang-tools-extra/test/clang-tidy/misc-static-assert.c index aa0b7ee2b9f..86738c918f6 100644 --- a/clang-tools-extra/test/clang-tidy/misc-static-assert.c +++ b/clang-tools-extra/test/clang-tidy/misc-static-assert.c @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-static-assert %t -- -std=c11
+// RUN: %check_clang_tidy %s misc-static-assert %t -- -std=c11
// RUN: clang-tidy %s -checks=-*,misc-static-assert -- -std=c99 | count 0
void abort() {}
diff --git a/clang-tools-extra/test/clang-tidy/misc-static-assert.cpp b/clang-tools-extra/test/clang-tidy/misc-static-assert.cpp index aa65edf8955..2a645d5d3cc 100644 --- a/clang-tools-extra/test/clang-tidy/misc-static-assert.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-static-assert.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-static-assert %t +// RUN: %check_clang_tidy %s misc-static-assert %t void abort() {} #ifdef NDEBUG diff --git a/clang-tools-extra/test/clang-tidy/misc-swapped-arguments.cpp b/clang-tools-extra/test/clang-tidy/misc-swapped-arguments.cpp index c6f96eccaa4..128bc750ef7 100644 --- a/clang-tools-extra/test/clang-tidy/misc-swapped-arguments.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-swapped-arguments.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-swapped-arguments %t +// RUN: %check_clang_tidy %s misc-swapped-arguments %t void F(int, double); diff --git a/clang-tools-extra/test/clang-tidy/misc-throw-by-value-catch-by-reference.cpp b/clang-tools-extra/test/clang-tidy/misc-throw-by-value-catch-by-reference.cpp index fc730d8c29d..134e8de92bf 100644 --- a/clang-tools-extra/test/clang-tidy/misc-throw-by-value-catch-by-reference.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-throw-by-value-catch-by-reference.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-throw-by-value-catch-by-reference %t -- -std=c++11 -fcxx-exceptions +// RUN: %check_clang_tidy %s misc-throw-by-value-catch-by-reference %t -- -std=c++11 -fcxx-exceptions class logic_error { diff --git a/clang-tools-extra/test/clang-tidy/misc-undelegated-constructor.cpp b/clang-tools-extra/test/clang-tidy/misc-undelegated-constructor.cpp index fbd464772fc..1b5e3c4c641 100644 --- a/clang-tools-extra/test/clang-tidy/misc-undelegated-constructor.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-undelegated-constructor.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-undelegated-constructor %t +// RUN: %check_clang_tidy %s misc-undelegated-constructor %t struct Ctor; Ctor foo(); diff --git a/clang-tools-extra/test/clang-tidy/misc-uniqueptr-reset-release.cpp b/clang-tools-extra/test/clang-tidy/misc-uniqueptr-reset-release.cpp index 710f8d65585..1bd6e6f4c54 100644 --- a/clang-tools-extra/test/clang-tidy/misc-uniqueptr-reset-release.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-uniqueptr-reset-release.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-uniqueptr-reset-release %t +// RUN: %check_clang_tidy %s misc-uniqueptr-reset-release %t namespace std { diff --git a/clang-tools-extra/test/clang-tidy/misc-unused-alias-decls.cpp b/clang-tools-extra/test/clang-tidy/misc-unused-alias-decls.cpp index 845e745a8b8..6d63df4047a 100644 --- a/clang-tools-extra/test/clang-tidy/misc-unused-alias-decls.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-unused-alias-decls.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-unused-alias-decls %t +// RUN: %check_clang_tidy %s misc-unused-alias-decls %t namespace my_namespace { class C {}; diff --git a/clang-tools-extra/test/clang-tidy/misc-unused-parameters.c b/clang-tools-extra/test/clang-tidy/misc-unused-parameters.c index 7832ee89521..b20c0889506 100644 --- a/clang-tools-extra/test/clang-tidy/misc-unused-parameters.c +++ b/clang-tools-extra/test/clang-tidy/misc-unused-parameters.c @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-unused-parameters %t -- -xc +// RUN: %check_clang_tidy %s misc-unused-parameters %t -- -xc // Basic removal // ============= diff --git a/clang-tools-extra/test/clang-tidy/misc-unused-parameters.cpp b/clang-tools-extra/test/clang-tidy/misc-unused-parameters.cpp index 9e845909733..a6099403719 100644 --- a/clang-tools-extra/test/clang-tidy/misc-unused-parameters.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-unused-parameters.cpp @@ -1,6 +1,6 @@ // RUN: echo "static void staticFunctionHeader(int i) {}" > %T/header.h // RUN: echo "static void staticFunctionHeader(int /*i*/) {}" > %T/header-fixed.h -// RUN: %python %S/check_clang_tidy.py %s misc-unused-parameters %t -header-filter='.*' -- -std=c++11 -fno-delayed-template-parsing +// RUN: %check_clang_tidy %s misc-unused-parameters %t -header-filter='.*' -- -std=c++11 -fno-delayed-template-parsing // RUN: diff %T/header.h %T/header-fixed.h #include "header.h" diff --git a/clang-tools-extra/test/clang-tidy/misc-unused-raii.cpp b/clang-tools-extra/test/clang-tidy/misc-unused-raii.cpp index 70b3c807284..f22746c0898 100644 --- a/clang-tools-extra/test/clang-tidy/misc-unused-raii.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-unused-raii.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s misc-unused-raii %t +// RUN: %check_clang_tidy %s misc-unused-raii %t struct Foo { Foo(); diff --git a/clang-tools-extra/test/clang-tidy/modernize-loop-convert-basic.cpp b/clang-tools-extra/test/clang-tidy/modernize-loop-convert-basic.cpp index 145ea7f0be0..6f03acdc9f2 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-loop-convert-basic.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-loop-convert-basic.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s modernize-loop-convert %t -- -std=c++11 -I %S/Inputs/modernize-loop-convert +// RUN: %check_clang_tidy %s modernize-loop-convert %t -- -std=c++11 -I %S/Inputs/modernize-loop-convert #include "structures.h" diff --git a/clang-tools-extra/test/clang-tidy/modernize-loop-convert-camelback.cpp b/clang-tools-extra/test/clang-tidy/modernize-loop-convert-camelback.cpp index 78ce4dc43e8..786a3d3a5d1 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-loop-convert-camelback.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-loop-convert-camelback.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s modernize-loop-convert %t \ +// RUN: %check_clang_tidy %s modernize-loop-convert %t \ // RUN: -config="{CheckOptions: [{key: modernize-loop-convert.NamingStyle, value: 'camelBack'}]}" \ // RUN: -- -std=c++11 -I %S/Inputs/modernize-loop-convert diff --git a/clang-tools-extra/test/clang-tidy/modernize-loop-convert-extra.cpp b/clang-tools-extra/test/clang-tidy/modernize-loop-convert-extra.cpp index a72e77f48b8..518f51695b6 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-loop-convert-extra.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-loop-convert-extra.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s modernize-loop-convert %t -- -std=c++11 -I %S/Inputs/modernize-loop-convert +// RUN: %check_clang_tidy %s modernize-loop-convert %t -- -std=c++11 -I %S/Inputs/modernize-loop-convert #include "structures.h" diff --git a/clang-tools-extra/test/clang-tidy/modernize-loop-convert-lowercase.cpp b/clang-tools-extra/test/clang-tidy/modernize-loop-convert-lowercase.cpp index d1ca71aca58..2d99ebb713a 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-loop-convert-lowercase.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-loop-convert-lowercase.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s modernize-loop-convert %t \ +// RUN: %check_clang_tidy %s modernize-loop-convert %t \ // RUN: -config="{CheckOptions: [{key: modernize-loop-convert.NamingStyle, value: 'lower_case'}]}" \ // RUN: -- -std=c++11 -I %S/Inputs/modernize-loop-convert diff --git a/clang-tools-extra/test/clang-tidy/modernize-loop-convert-negative.cpp b/clang-tools-extra/test/clang-tidy/modernize-loop-convert-negative.cpp index 05d7422023f..7ddebacb9c2 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-loop-convert-negative.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-loop-convert-negative.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s modernize-loop-convert %t -- -std=c++11 -I %S/Inputs/modernize-loop-convert +// RUN: %check_clang_tidy %s modernize-loop-convert %t -- -std=c++11 -I %S/Inputs/modernize-loop-convert #include "structures.h" diff --git a/clang-tools-extra/test/clang-tidy/modernize-loop-convert-uppercase.cpp b/clang-tools-extra/test/clang-tidy/modernize-loop-convert-uppercase.cpp index 1f172a47dd8..5edbe08ffa0 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-loop-convert-uppercase.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-loop-convert-uppercase.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s modernize-loop-convert %t \ +// RUN: %check_clang_tidy %s modernize-loop-convert %t \ // RUN: -config="{CheckOptions: [{key: modernize-loop-convert.NamingStyle, value: 'UPPER_CASE'}]}" \ // RUN: -- -std=c++11 -I %S/Inputs/modernize-loop-convert diff --git a/clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp b/clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp index ce92b4c1ce5..fdf834ee704 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s modernize-make-unique %t +// RUN: %check_clang_tidy %s modernize-make-unique %t namespace std { diff --git a/clang-tools-extra/test/clang-tidy/modernize-pass-by-value.cpp b/clang-tools-extra/test/clang-tidy/modernize-pass-by-value.cpp index e9347fc1d67..e72604490b5 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-pass-by-value.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-pass-by-value.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s modernize-pass-by-value %t -- -std=c++11 -fno-delayed-template-parsing +// RUN: %check_clang_tidy %s modernize-pass-by-value %t -- -std=c++11 -fno-delayed-template-parsing // CHECK-FIXES: #include <utility> diff --git a/clang-tools-extra/test/clang-tidy/modernize-replace-auto-ptr.cpp b/clang-tools-extra/test/clang-tidy/modernize-replace-auto-ptr.cpp index 632477daa42..58d562a7a1f 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-replace-auto-ptr.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-replace-auto-ptr.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s modernize-replace-auto-ptr %t -- \ +// RUN: %check_clang_tidy %s modernize-replace-auto-ptr %t -- \ // RUN: -std=c++11 -I %S/Inputs/modernize-replace-auto-ptr // CHECK-FIXES: #include <utility> diff --git a/clang-tools-extra/test/clang-tidy/modernize-shrink-to-fit.cpp b/clang-tools-extra/test/clang-tidy/modernize-shrink-to-fit.cpp index e3694880fe4..1cbb0b48c42 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-shrink-to-fit.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-shrink-to-fit.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s modernize-shrink-to-fit %t +// RUN: %check_clang_tidy %s modernize-shrink-to-fit %t namespace std { template <typename T> struct vector { void swap(vector &other); }; diff --git a/clang-tools-extra/test/clang-tidy/modernize-use-auto-iterator.cpp b/clang-tools-extra/test/clang-tidy/modernize-use-auto-iterator.cpp index 4426ee5c21d..15a7c9cc208 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-use-auto-iterator.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-use-auto-iterator.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s modernize-use-auto %t -- \ +// RUN: %check_clang_tidy %s modernize-use-auto %t -- \ // RUN: -std=c++11 -I %S/Inputs/modernize-use-auto #include "containers.h" diff --git a/clang-tools-extra/test/clang-tidy/modernize-use-auto-new.cpp b/clang-tools-extra/test/clang-tidy/modernize-use-auto-new.cpp index f934c0de275..ccf48d509d0 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-use-auto-new.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-use-auto-new.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s modernize-use-auto %t +// RUN: %check_clang_tidy %s modernize-use-auto %t class MyType {}; diff --git a/clang-tools-extra/test/clang-tidy/modernize-use-default.cpp b/clang-tools-extra/test/clang-tidy/modernize-use-default.cpp index 0119a0306a2..504a605e7e6 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-use-default.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-use-default.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s modernize-use-default %t -- -std=c++11 -fno-delayed-template-parsing +// RUN: %check_clang_tidy %s modernize-use-default %t -- -std=c++11 -fno-delayed-template-parsing class A { public: diff --git a/clang-tools-extra/test/clang-tidy/modernize-use-nullptr-basic.cpp b/clang-tools-extra/test/clang-tidy/modernize-use-nullptr-basic.cpp index f384d26163b..eb2f8422202 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-use-nullptr-basic.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-use-nullptr-basic.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s modernize-use-nullptr %t -- \ +// RUN: %check_clang_tidy %s modernize-use-nullptr %t -- \ // RUN: -std=c++98 -Wno-non-literal-null-conversion // // Some parts of the test (e.g. assignment of `const int` to `int *`) fail in diff --git a/clang-tools-extra/test/clang-tidy/modernize-use-nullptr.cpp b/clang-tools-extra/test/clang-tidy/modernize-use-nullptr.cpp index ef37a91731b..a18c7a68d59 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-use-nullptr.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-use-nullptr.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s modernize-use-nullptr %t \ +// RUN: %check_clang_tidy %s modernize-use-nullptr %t \ // RUN: -config="{CheckOptions: [{key: modernize-use-nullptr.NullMacros, value: 'MY_NULL,NULL'}]}" \ // RUN: -- -std=c++11 diff --git a/clang-tools-extra/test/clang-tidy/modernize-use-override-cxx98.cpp b/clang-tools-extra/test/clang-tidy/modernize-use-override-cxx98.cpp index c061e8a3d7c..41e2b985f0b 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-use-override-cxx98.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-use-override-cxx98.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s modernize-use-override %t -- -std=c++98 +// RUN: %check_clang_tidy %s modernize-use-override %t -- -std=c++98 struct Base { virtual ~Base() {} diff --git a/clang-tools-extra/test/clang-tidy/modernize-use-override.cpp b/clang-tools-extra/test/clang-tidy/modernize-use-override.cpp index 8d6dfaff023..cfd9b0b2873 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-use-override.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-use-override.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s modernize-use-override %t +// RUN: %check_clang_tidy %s modernize-use-override %t #define ABSTRACT = 0 diff --git a/clang-tools-extra/test/clang-tidy/readability-braces-around-statements-few-lines.cpp b/clang-tools-extra/test/clang-tidy/readability-braces-around-statements-few-lines.cpp index db01ccd6f6a..01653366df6 100644 --- a/clang-tools-extra/test/clang-tidy/readability-braces-around-statements-few-lines.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-braces-around-statements-few-lines.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s readability-braces-around-statements %t -config="{CheckOptions: [{key: readability-braces-around-statements.ShortStatementLines, value: 4}]}" -- +// RUN: %check_clang_tidy %s readability-braces-around-statements %t -config="{CheckOptions: [{key: readability-braces-around-statements.ShortStatementLines, value: 4}]}" -- void do_something(const char *) {} diff --git a/clang-tools-extra/test/clang-tidy/readability-braces-around-statements-same-line.cpp b/clang-tools-extra/test/clang-tidy/readability-braces-around-statements-same-line.cpp index 1f6f0c0b615..2f0cc46963a 100644 --- a/clang-tools-extra/test/clang-tidy/readability-braces-around-statements-same-line.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-braces-around-statements-same-line.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s readability-braces-around-statements %t -config="{CheckOptions: [{key: readability-braces-around-statements.ShortStatementLines, value: 1}]}" -- +// RUN: %check_clang_tidy %s readability-braces-around-statements %t -config="{CheckOptions: [{key: readability-braces-around-statements.ShortStatementLines, value: 1}]}" -- void do_something(const char *) {} diff --git a/clang-tools-extra/test/clang-tidy/readability-braces-around-statements-single-line.cpp b/clang-tools-extra/test/clang-tidy/readability-braces-around-statements-single-line.cpp index 96d91aea299..7352c8b106b 100644 --- a/clang-tools-extra/test/clang-tidy/readability-braces-around-statements-single-line.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-braces-around-statements-single-line.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s readability-braces-around-statements %t -config="{CheckOptions: [{key: readability-braces-around-statements.ShortStatementLines, value: 2}]}" -- +// RUN: %check_clang_tidy %s readability-braces-around-statements %t -config="{CheckOptions: [{key: readability-braces-around-statements.ShortStatementLines, value: 2}]}" -- void do_something(const char *) {} diff --git a/clang-tools-extra/test/clang-tidy/readability-braces-around-statements.cpp b/clang-tools-extra/test/clang-tidy/readability-braces-around-statements.cpp index 485a13a6827..ee147f62349 100644 --- a/clang-tools-extra/test/clang-tidy/readability-braces-around-statements.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-braces-around-statements.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s readability-braces-around-statements %t +// RUN: %check_clang_tidy %s readability-braces-around-statements %t void do_something(const char *) {} diff --git a/clang-tools-extra/test/clang-tidy/readability-container-size-empty.cpp b/clang-tools-extra/test/clang-tidy/readability-container-size-empty.cpp index 6443bde2d4e..9dea5dc8c17 100644 --- a/clang-tools-extra/test/clang-tidy/readability-container-size-empty.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-container-size-empty.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s readability-container-size-empty %t +// RUN: %check_clang_tidy %s readability-container-size-empty %t namespace std { template <typename T> struct vector { diff --git a/clang-tools-extra/test/clang-tidy/readability-else-after-return.cpp b/clang-tools-extra/test/clang-tidy/readability-else-after-return.cpp index f345be5053d..28fd2ec0f05 100644 --- a/clang-tools-extra/test/clang-tidy/readability-else-after-return.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-else-after-return.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s readability-else-after-return %t +// RUN: %check_clang_tidy %s readability-else-after-return %t void f(int a) { if (a > 0) diff --git a/clang-tools-extra/test/clang-tidy/readability-function-size.cpp b/clang-tools-extra/test/clang-tidy/readability-function-size.cpp index 7bf2eff6449..9536bb6fe1a 100644 --- a/clang-tools-extra/test/clang-tidy/readability-function-size.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-function-size.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s readability-function-size %t -config='{CheckOptions: [{key: readability-function-size.LineThreshold, value: 0}, {key: readability-function-size.StatementThreshold, value: 0}, {key: readability-function-size.BranchThreshold, value: 0}]}' -- -std=c++11 +// RUN: %check_clang_tidy %s readability-function-size %t -config='{CheckOptions: [{key: readability-function-size.LineThreshold, value: 0}, {key: readability-function-size.StatementThreshold, value: 0}, {key: readability-function-size.BranchThreshold, value: 0}]}' -- -std=c++11 void foo1() { } diff --git a/clang-tools-extra/test/clang-tidy/readability-identifier-naming.cpp b/clang-tools-extra/test/clang-tidy/readability-identifier-naming.cpp index 681fd7e692c..a97f8e9bc0a 100644 --- a/clang-tools-extra/test/clang-tidy/readability-identifier-naming.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-identifier-naming.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s readability-identifier-naming %t \ +// RUN: %check_clang_tidy %s readability-identifier-naming %t \ // RUN: -config='{CheckOptions: [ \ // RUN: {key: readability-identifier-naming.AbstractClassCase, value: CamelCase}, \ // RUN: {key: readability-identifier-naming.AbstractClassPrefix, value: 'A'}, \ diff --git a/clang-tools-extra/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp b/clang-tools-extra/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp index 15dbeb1a984..55a9a5ffb53 100644 --- a/clang-tools-extra/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s readability-inconsistent-declaration-parameter-name %t -- -std=c++11 -fno-delayed-template-parsing +// RUN: %check_clang_tidy %s readability-inconsistent-declaration-parameter-name %t -- -std=c++11 -fno-delayed-template-parsing void consistentFunction(int a, int b, int c); void consistentFunction(int a, int b, int c); diff --git a/clang-tools-extra/test/clang-tidy/readability-named-parameter.cpp b/clang-tools-extra/test/clang-tidy/readability-named-parameter.cpp index ddd9671a762..f2d31e26999 100644 --- a/clang-tools-extra/test/clang-tidy/readability-named-parameter.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-named-parameter.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s readability-named-parameter %t +// RUN: %check_clang_tidy %s readability-named-parameter %t void Method(char *) { /* */ } // CHECK-MESSAGES: :[[@LINE-1]]:19: warning: all parameters should be named in a function diff --git a/clang-tools-extra/test/clang-tidy/readability-redundant-smartptr-get.cpp b/clang-tools-extra/test/clang-tidy/readability-redundant-smartptr-get.cpp index 0c1e200a52d..2840ab23192 100644 --- a/clang-tools-extra/test/clang-tidy/readability-redundant-smartptr-get.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-redundant-smartptr-get.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s readability-redundant-smartptr-get %t +// RUN: %check_clang_tidy %s readability-redundant-smartptr-get %t #define NULL __null diff --git a/clang-tools-extra/test/clang-tidy/readability-redundant-string-cstr.cpp b/clang-tools-extra/test/clang-tidy/readability-redundant-string-cstr.cpp index 9c610ea9cd4..e6f6328dad5 100644 --- a/clang-tools-extra/test/clang-tidy/readability-redundant-string-cstr.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-redundant-string-cstr.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s readability-redundant-string-cstr %t +// RUN: %check_clang_tidy %s readability-redundant-string-cstr %t namespace std { template <typename T> diff --git a/clang-tools-extra/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-assignment.cpp b/clang-tools-extra/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-assignment.cpp index 395184902a0..b0e85dfc5ce 100644 --- a/clang-tools-extra/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-assignment.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-assignment.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s readability-simplify-boolean-expr %t -config="{CheckOptions: [{key: "readability-simplify-boolean-expr.ChainedConditionalAssignment", value: 1}]}" -- +// RUN: %check_clang_tidy %s readability-simplify-boolean-expr %t -config="{CheckOptions: [{key: "readability-simplify-boolean-expr.ChainedConditionalAssignment", value: 1}]}" -- void chained_conditional_compound_assignment(int i) { bool b; diff --git a/clang-tools-extra/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-return.cpp b/clang-tools-extra/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-return.cpp index 3400cc22000..d0021915585 100644 --- a/clang-tools-extra/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-return.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-return.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s readability-simplify-boolean-expr %t -config="{CheckOptions: [{key: "readability-simplify-boolean-expr.ChainedConditionalReturn", value: 1}]}" -- +// RUN: %check_clang_tidy %s readability-simplify-boolean-expr %t -config="{CheckOptions: [{key: "readability-simplify-boolean-expr.ChainedConditionalReturn", value: 1}]}" -- bool chained_conditional_compound_return(int i) { if (i < 0) { diff --git a/clang-tools-extra/test/clang-tidy/readability-simplify-bool-expr.cpp b/clang-tools-extra/test/clang-tidy/readability-simplify-bool-expr.cpp index 327a92dc8e9..58cb416f37f 100644 --- a/clang-tools-extra/test/clang-tidy/readability-simplify-bool-expr.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-simplify-bool-expr.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s readability-simplify-boolean-expr %t +// RUN: %check_clang_tidy %s readability-simplify-boolean-expr %t bool a1 = false; diff --git a/clang-tools-extra/test/clang-tidy/readability-uniqueptr-delete-release.cpp b/clang-tools-extra/test/clang-tidy/readability-uniqueptr-delete-release.cpp index 8fb7562dd41..aa8ae25944e 100644 --- a/clang-tools-extra/test/clang-tidy/readability-uniqueptr-delete-release.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-uniqueptr-delete-release.cpp @@ -1,4 +1,4 @@ -// RUN: %python %S/check_clang_tidy.py %s readability-uniqueptr-delete-release %t +// RUN: %check_clang_tidy %s readability-uniqueptr-delete-release %t namespace std { template <typename T> diff --git a/clang-tools-extra/test/lit.cfg b/clang-tools-extra/test/lit.cfg index 21f353a448e..e6dab49377d 100644 --- a/clang-tools-extra/test/lit.cfg +++ b/clang-tools-extra/test/lit.cfg @@ -188,4 +188,13 @@ if not platform.system() in ['Windows'] or not execute_external: if platform.system() not in ['Windows']: config.available_features.add('ansi-escape-sequences') -config.substitutions.append( ('%python', config.python_executable) ) +check_clang_tidy = os.path.join( + config.test_source_root, "clang-tidy", "check_clang_tidy.py") +config.substitutions.append( + ('%check_clang_tidy', + '%s %s' % (config.python_executable, check_clang_tidy)) ) +clang_tidy_diff = os.path.join( + config.test_source_root, "..", "clang-tidy", "tool", "clang-tidy-diff.py") +config.substitutions.append( + ('%clang_tidy_diff', + '%s %s' % (config.python_executable, clang_tidy_diff)) ) |