From 82aa9cf4404954bdb2660014769070bbc6135cc4 Mon Sep 17 00:00:00 2001 From: Manuel Klimek Date: Thu, 22 Oct 2015 11:31:44 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@251010 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/clang-tidy/cert-setlongjmp.cpp | 2 +- test/clang-tidy/cert-variadic-function-def.cpp | 2 +- test/clang-tidy/check_clang_tidy.py | 2 +- test/clang-tidy/clang-tidy-diff.cpp | 2 +- ...ppcoreguidelines-pro-bounds-pointer-arithmetic.cpp | 2 +- .../cppcoreguidelines-pro-type-const-cast.cpp | 2 +- .../cppcoreguidelines-pro-type-reinterpret-cast.cpp | 2 +- ...ppcoreguidelines-pro-type-static-cast-downcast.cpp | 2 +- .../cppcoreguidelines-pro-type-union-access.cpp | 2 +- test/clang-tidy/cppcoreguidelines-pro-type-vararg.cpp | 2 +- test/clang-tidy/google-build-explicit-make-pair.cpp | 2 +- test/clang-tidy/google-explicit-constructor.cpp | 2 +- test/clang-tidy/google-overloaded-unary-and.cpp | 2 +- test/clang-tidy/google-readability-casting.c | 2 +- test/clang-tidy/google-readability-casting.cpp | 2 +- .../google-readability-namespace-comments.cpp | 2 +- test/clang-tidy/google-readability-todo.cpp | 2 +- test/clang-tidy/google-runtime-int-std.cpp | 2 +- test/clang-tidy/google-runtime-int.cpp | 2 +- .../google-runtime-member-string-references.cpp | 2 +- test/clang-tidy/google-runtime-memset-zero-length.cpp | 2 +- test/clang-tidy/llvm-include-order.cpp | 2 +- test/clang-tidy/llvm-twine-local.cpp | 2 +- test/clang-tidy/misc-argument-comment.cpp | 2 +- test/clang-tidy/misc-assert-side-effect.cpp | 2 +- test/clang-tidy/misc-assign-operator-signature.cpp | 2 +- .../misc-bool-pointer-implicit-conversion.cpp | 2 +- test/clang-tidy/misc-inaccurate-erase.cpp | 2 +- test/clang-tidy/misc-inefficient-algorithm.cpp | 2 +- test/clang-tidy/misc-macro-parentheses.cpp | 2 +- test/clang-tidy/misc-move-constructor-init.cpp | 2 +- .../misc-new-delete-overloads-sized-dealloc.cpp | 2 +- test/clang-tidy/misc-new-delete-overloads.cpp | 2 +- test/clang-tidy/misc-noexcept-move-constructor.cpp | 2 +- test/clang-tidy/misc-non-copyable-objects.c | 2 +- test/clang-tidy/misc-non-copyable-objects.cpp | 2 +- test/clang-tidy/misc-repeated-side-effects-in-macro.c | 2 +- test/clang-tidy/misc-sizeof-container.cpp | 2 +- test/clang-tidy/misc-static-assert.c | 2 +- test/clang-tidy/misc-static-assert.cpp | 2 +- test/clang-tidy/misc-swapped-arguments.cpp | 2 +- .../misc-throw-by-value-catch-by-reference.cpp | 2 +- test/clang-tidy/misc-undelegated-constructor.cpp | 2 +- test/clang-tidy/misc-uniqueptr-reset-release.cpp | 2 +- test/clang-tidy/misc-unused-alias-decls.cpp | 2 +- test/clang-tidy/misc-unused-parameters.c | 2 +- test/clang-tidy/misc-unused-parameters.cpp | 2 +- test/clang-tidy/misc-unused-raii.cpp | 2 +- test/clang-tidy/modernize-loop-convert-basic.cpp | 2 +- test/clang-tidy/modernize-loop-convert-camelback.cpp | 2 +- test/clang-tidy/modernize-loop-convert-extra.cpp | 2 +- test/clang-tidy/modernize-loop-convert-lowercase.cpp | 2 +- test/clang-tidy/modernize-loop-convert-negative.cpp | 2 +- test/clang-tidy/modernize-loop-convert-uppercase.cpp | 2 +- test/clang-tidy/modernize-make-unique.cpp | 2 +- test/clang-tidy/modernize-pass-by-value.cpp | 2 +- test/clang-tidy/modernize-replace-auto-ptr.cpp | 2 +- test/clang-tidy/modernize-shrink-to-fit.cpp | 2 +- test/clang-tidy/modernize-use-auto-iterator.cpp | 2 +- test/clang-tidy/modernize-use-auto-new.cpp | 2 +- test/clang-tidy/modernize-use-default.cpp | 2 +- test/clang-tidy/modernize-use-nullptr-basic.cpp | 2 +- test/clang-tidy/modernize-use-nullptr.cpp | 2 +- test/clang-tidy/modernize-use-override-cxx98.cpp | 2 +- test/clang-tidy/modernize-use-override.cpp | 2 +- ...readability-braces-around-statements-few-lines.cpp | 2 +- ...readability-braces-around-statements-same-line.cpp | 2 +- ...adability-braces-around-statements-single-line.cpp | 2 +- .../readability-braces-around-statements.cpp | 2 +- test/clang-tidy/readability-container-size-empty.cpp | 2 +- test/clang-tidy/readability-else-after-return.cpp | 2 +- test/clang-tidy/readability-function-size.cpp | 2 +- test/clang-tidy/readability-identifier-naming.cpp | 2 +- ...bility-inconsistent-declaration-parameter-name.cpp | 2 +- test/clang-tidy/readability-named-parameter.cpp | 2 +- .../clang-tidy/readability-redundant-smartptr-get.cpp | 2 +- test/clang-tidy/readability-redundant-string-cstr.cpp | 2 +- ...plify-bool-expr-chained-conditional-assignment.cpp | 2 +- ...-simplify-bool-expr-chained-conditional-return.cpp | 2 +- test/clang-tidy/readability-simplify-bool-expr.cpp | 2 +- .../readability-uniqueptr-delete-release.cpp | 2 +- test/lit.cfg | 11 ++++++++++- 82 files changed, 91 insertions(+), 82 deletions(-) diff --git a/test/clang-tidy/cert-setlongjmp.cpp b/test/clang-tidy/cert-setlongjmp.cpp index b5b5b1e..e0cba90 100644 --- a/test/clang-tidy/cert-setlongjmp.cpp +++ b/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/test/clang-tidy/cert-variadic-function-def.cpp b/test/clang-tidy/cert-variadic-function-def.cpp index 2c1420b..6b2421b 100644 --- a/test/clang-tidy/cert-variadic-function-def.cpp +++ b/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/test/clang-tidy/check_clang_tidy.py b/test/clang-tidy/check_clang_tidy.py index b6c82d9..101553c 100755 --- a/test/clang-tidy/check_clang_tidy.py +++ b/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/test/clang-tidy/clang-tidy-diff.cpp b/test/clang-tidy/clang-tidy-diff.cpp index f024195..88a0c01 100644 --- a/test/clang-tidy/clang-tidy-diff.cpp +++ b/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/test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp b/test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp index b765f00..c8fea80 100644 --- a/test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp +++ b/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/test/clang-tidy/cppcoreguidelines-pro-type-const-cast.cpp b/test/clang-tidy/cppcoreguidelines-pro-type-const-cast.cpp index 6221c04..2d32e13 100644 --- a/test/clang-tidy/cppcoreguidelines-pro-type-const-cast.cpp +++ b/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/test/clang-tidy/cppcoreguidelines-pro-type-reinterpret-cast.cpp b/test/clang-tidy/cppcoreguidelines-pro-type-reinterpret-cast.cpp index 0282232..5420810 100644 --- a/test/clang-tidy/cppcoreguidelines-pro-type-reinterpret-cast.cpp +++ b/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/test/clang-tidy/cppcoreguidelines-pro-type-static-cast-downcast.cpp b/test/clang-tidy/cppcoreguidelines-pro-type-static-cast-downcast.cpp index 4e31f6f..7a6c027 100644 --- a/test/clang-tidy/cppcoreguidelines-pro-type-static-cast-downcast.cpp +++ b/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/test/clang-tidy/cppcoreguidelines-pro-type-union-access.cpp b/test/clang-tidy/cppcoreguidelines-pro-type-union-access.cpp index 2596b44..6abc22b 100644 --- a/test/clang-tidy/cppcoreguidelines-pro-type-union-access.cpp +++ b/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/test/clang-tidy/cppcoreguidelines-pro-type-vararg.cpp b/test/clang-tidy/cppcoreguidelines-pro-type-vararg.cpp index b2b4784..4df1c37 100644 --- a/test/clang-tidy/cppcoreguidelines-pro-type-vararg.cpp +++ b/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/test/clang-tidy/google-build-explicit-make-pair.cpp b/test/clang-tidy/google-build-explicit-make-pair.cpp index ac51ce6..6dcd357 100644 --- a/test/clang-tidy/google-build-explicit-make-pair.cpp +++ b/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 diff --git a/test/clang-tidy/google-explicit-constructor.cpp b/test/clang-tidy/google-explicit-constructor.cpp index 0bc7040..02a1600 100644 --- a/test/clang-tidy/google-explicit-constructor.cpp +++ b/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/test/clang-tidy/google-overloaded-unary-and.cpp b/test/clang-tidy/google-overloaded-unary-and.cpp index ab1312f..16893d2 100644 --- a/test/clang-tidy/google-overloaded-unary-and.cpp +++ b/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/test/clang-tidy/google-readability-casting.c b/test/clang-tidy/google-readability-casting.c index b195667..0d14813 100644 --- a/test/clang-tidy/google-readability-casting.c +++ b/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/test/clang-tidy/google-readability-casting.cpp b/test/clang-tidy/google-readability-casting.cpp index 50c3cb7..5b9e16b 100644 --- a/test/clang-tidy/google-readability-casting.cpp +++ b/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/test/clang-tidy/google-readability-namespace-comments.cpp b/test/clang-tidy/google-readability-namespace-comments.cpp index ab5391b..1996552 100644 --- a/test/clang-tidy/google-readability-namespace-comments.cpp +++ b/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/test/clang-tidy/google-readability-todo.cpp b/test/clang-tidy/google-readability-todo.cpp index d2e3b6c..967b15c 100644 --- a/test/clang-tidy/google-readability-todo.cpp +++ b/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/test/clang-tidy/google-runtime-int-std.cpp b/test/clang-tidy/google-runtime-int-std.cpp index 8efd504..0b3c895 100644 --- a/test/clang-tidy/google-runtime-int-std.cpp +++ b/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/test/clang-tidy/google-runtime-int.cpp b/test/clang-tidy/google-runtime-int.cpp index 6529ffc..bcf6eb6 100644 --- a/test/clang-tidy/google-runtime-int.cpp +++ b/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/test/clang-tidy/google-runtime-member-string-references.cpp b/test/clang-tidy/google-runtime-member-string-references.cpp index 0914645..b153149 100644 --- a/test/clang-tidy/google-runtime-member-string-references.cpp +++ b/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 diff --git a/test/clang-tidy/google-runtime-memset-zero-length.cpp b/test/clang-tidy/google-runtime-memset-zero-length.cpp index 88c38e6..db75cb0 100644 --- a/test/clang-tidy/google-runtime-memset-zero-length.cpp +++ b/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/test/clang-tidy/llvm-include-order.cpp b/test/clang-tidy/llvm-include-order.cpp index 6be5d05..d323db2 100644 --- a/test/clang-tidy/llvm-include-order.cpp +++ b/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/test/clang-tidy/llvm-twine-local.cpp b/test/clang-tidy/llvm-twine-local.cpp index a571109..aa99420 100644 --- a/test/clang-tidy/llvm-twine-local.cpp +++ b/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/test/clang-tidy/misc-argument-comment.cpp b/test/clang-tidy/misc-argument-comment.cpp index 93fcb12..93217b0 100644 --- a/test/clang-tidy/misc-argument-comment.cpp +++ b/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/test/clang-tidy/misc-assert-side-effect.cpp b/test/clang-tidy/misc-assert-side-effect.cpp index e995aa3..a87418c 100644 --- a/test/clang-tidy/misc-assert-side-effect.cpp +++ b/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/test/clang-tidy/misc-assign-operator-signature.cpp b/test/clang-tidy/misc-assign-operator-signature.cpp index c0dacc7..1b85d4b 100644 --- a/test/clang-tidy/misc-assign-operator-signature.cpp +++ b/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/test/clang-tidy/misc-bool-pointer-implicit-conversion.cpp b/test/clang-tidy/misc-bool-pointer-implicit-conversion.cpp index 147b372..bb71ce1 100644 --- a/test/clang-tidy/misc-bool-pointer-implicit-conversion.cpp +++ b/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/test/clang-tidy/misc-inaccurate-erase.cpp b/test/clang-tidy/misc-inaccurate-erase.cpp index 2e86638..4c75003 100644 --- a/test/clang-tidy/misc-inaccurate-erase.cpp +++ b/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 struct vec_iterator { diff --git a/test/clang-tidy/misc-inefficient-algorithm.cpp b/test/clang-tidy/misc-inefficient-algorithm.cpp index 9bc5628..df962c9 100644 --- a/test/clang-tidy/misc-inefficient-algorithm.cpp +++ b/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 struct less { diff --git a/test/clang-tidy/misc-macro-parentheses.cpp b/test/clang-tidy/misc-macro-parentheses.cpp index 6959ee7..123841a 100644 --- a/test/clang-tidy/misc-macro-parentheses.cpp +++ b/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/test/clang-tidy/misc-move-constructor-init.cpp b/test/clang-tidy/misc-move-constructor-init.cpp index e3c0174..3ac93ef 100644 --- a/test/clang-tidy/misc-move-constructor-init.cpp +++ b/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 diff --git a/test/clang-tidy/misc-new-delete-overloads-sized-dealloc.cpp b/test/clang-tidy/misc-new-delete-overloads-sized-dealloc.cpp index 736ab94..4dc4ade 100644 --- a/test/clang-tidy/misc-new-delete-overloads-sized-dealloc.cpp +++ b/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/test/clang-tidy/misc-new-delete-overloads.cpp b/test/clang-tidy/misc-new-delete-overloads.cpp index d893ada..42f2a45 100644 --- a/test/clang-tidy/misc-new-delete-overloads.cpp +++ b/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/test/clang-tidy/misc-noexcept-move-constructor.cpp b/test/clang-tidy/misc-noexcept-move-constructor.cpp index bb66471..289cc13 100644 --- a/test/clang-tidy/misc-noexcept-move-constructor.cpp +++ b/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/test/clang-tidy/misc-non-copyable-objects.c b/test/clang-tidy/misc-non-copyable-objects.c index 4fe10e6..98e52b9 100644 --- a/test/clang-tidy/misc-non-copyable-objects.c +++ b/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/test/clang-tidy/misc-non-copyable-objects.cpp b/test/clang-tidy/misc-non-copyable-objects.cpp index 2f18f6f..3d716f4 100644 --- a/test/clang-tidy/misc-non-copyable-objects.cpp +++ b/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/test/clang-tidy/misc-repeated-side-effects-in-macro.c b/test/clang-tidy/misc-repeated-side-effects-in-macro.c index e83caae..a23dd0c 100644 --- a/test/clang-tidy/misc-repeated-side-effects-in-macro.c +++ b/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/test/clang-tidy/misc-sizeof-container.cpp b/test/clang-tidy/misc-sizeof-container.cpp index fc84b2b..ebb8bdf 100644 --- a/test/clang-tidy/misc-sizeof-container.cpp +++ b/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/test/clang-tidy/misc-static-assert.c b/test/clang-tidy/misc-static-assert.c index aa0b7ee..86738c9 100644 --- a/test/clang-tidy/misc-static-assert.c +++ b/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/test/clang-tidy/misc-static-assert.cpp b/test/clang-tidy/misc-static-assert.cpp index aa65edf..2a645d5 100644 --- a/test/clang-tidy/misc-static-assert.cpp +++ b/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/test/clang-tidy/misc-swapped-arguments.cpp b/test/clang-tidy/misc-swapped-arguments.cpp index c6f96ec..128bc75 100644 --- a/test/clang-tidy/misc-swapped-arguments.cpp +++ b/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/test/clang-tidy/misc-throw-by-value-catch-by-reference.cpp b/test/clang-tidy/misc-throw-by-value-catch-by-reference.cpp index fc730d8..134e8de 100644 --- a/test/clang-tidy/misc-throw-by-value-catch-by-reference.cpp +++ b/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/test/clang-tidy/misc-undelegated-constructor.cpp b/test/clang-tidy/misc-undelegated-constructor.cpp index fbd4647..1b5e3c4 100644 --- a/test/clang-tidy/misc-undelegated-constructor.cpp +++ b/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/test/clang-tidy/misc-uniqueptr-reset-release.cpp b/test/clang-tidy/misc-uniqueptr-reset-release.cpp index 710f8d6..1bd6e6f 100644 --- a/test/clang-tidy/misc-uniqueptr-reset-release.cpp +++ b/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/test/clang-tidy/misc-unused-alias-decls.cpp b/test/clang-tidy/misc-unused-alias-decls.cpp index 845e745..6d63df4 100644 --- a/test/clang-tidy/misc-unused-alias-decls.cpp +++ b/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/test/clang-tidy/misc-unused-parameters.c b/test/clang-tidy/misc-unused-parameters.c index 7832ee8..b20c088 100644 --- a/test/clang-tidy/misc-unused-parameters.c +++ b/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/test/clang-tidy/misc-unused-parameters.cpp b/test/clang-tidy/misc-unused-parameters.cpp index 9e84590..a609940 100644 --- a/test/clang-tidy/misc-unused-parameters.cpp +++ b/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/test/clang-tidy/misc-unused-raii.cpp b/test/clang-tidy/misc-unused-raii.cpp index 70b3c80..f22746c 100644 --- a/test/clang-tidy/misc-unused-raii.cpp +++ b/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/test/clang-tidy/modernize-loop-convert-basic.cpp b/test/clang-tidy/modernize-loop-convert-basic.cpp index 145ea7f..6f03acd 100644 --- a/test/clang-tidy/modernize-loop-convert-basic.cpp +++ b/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/test/clang-tidy/modernize-loop-convert-camelback.cpp b/test/clang-tidy/modernize-loop-convert-camelback.cpp index 78ce4dc..786a3d3 100644 --- a/test/clang-tidy/modernize-loop-convert-camelback.cpp +++ b/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/test/clang-tidy/modernize-loop-convert-extra.cpp b/test/clang-tidy/modernize-loop-convert-extra.cpp index a72e77f..518f516 100644 --- a/test/clang-tidy/modernize-loop-convert-extra.cpp +++ b/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/test/clang-tidy/modernize-loop-convert-lowercase.cpp b/test/clang-tidy/modernize-loop-convert-lowercase.cpp index d1ca71a..2d99ebb 100644 --- a/test/clang-tidy/modernize-loop-convert-lowercase.cpp +++ b/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/test/clang-tidy/modernize-loop-convert-negative.cpp b/test/clang-tidy/modernize-loop-convert-negative.cpp index 05d7422..7ddebac 100644 --- a/test/clang-tidy/modernize-loop-convert-negative.cpp +++ b/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/test/clang-tidy/modernize-loop-convert-uppercase.cpp b/test/clang-tidy/modernize-loop-convert-uppercase.cpp index 1f172a4..5edbe08 100644 --- a/test/clang-tidy/modernize-loop-convert-uppercase.cpp +++ b/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/test/clang-tidy/modernize-make-unique.cpp b/test/clang-tidy/modernize-make-unique.cpp index ce92b4c..fdf834e 100644 --- a/test/clang-tidy/modernize-make-unique.cpp +++ b/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/test/clang-tidy/modernize-pass-by-value.cpp b/test/clang-tidy/modernize-pass-by-value.cpp index e9347fc..e726044 100644 --- a/test/clang-tidy/modernize-pass-by-value.cpp +++ b/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 diff --git a/test/clang-tidy/modernize-replace-auto-ptr.cpp b/test/clang-tidy/modernize-replace-auto-ptr.cpp index 632477d..58d562a 100644 --- a/test/clang-tidy/modernize-replace-auto-ptr.cpp +++ b/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 diff --git a/test/clang-tidy/modernize-shrink-to-fit.cpp b/test/clang-tidy/modernize-shrink-to-fit.cpp index e369488..1cbb0b4 100644 --- a/test/clang-tidy/modernize-shrink-to-fit.cpp +++ b/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 struct vector { void swap(vector &other); }; diff --git a/test/clang-tidy/modernize-use-auto-iterator.cpp b/test/clang-tidy/modernize-use-auto-iterator.cpp index 4426ee5..15a7c9c 100644 --- a/test/clang-tidy/modernize-use-auto-iterator.cpp +++ b/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/test/clang-tidy/modernize-use-auto-new.cpp b/test/clang-tidy/modernize-use-auto-new.cpp index f934c0d..ccf48d5 100644 --- a/test/clang-tidy/modernize-use-auto-new.cpp +++ b/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/test/clang-tidy/modernize-use-default.cpp b/test/clang-tidy/modernize-use-default.cpp index 0119a03..504a605 100644 --- a/test/clang-tidy/modernize-use-default.cpp +++ b/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/test/clang-tidy/modernize-use-nullptr-basic.cpp b/test/clang-tidy/modernize-use-nullptr-basic.cpp index f384d26..eb2f842 100644 --- a/test/clang-tidy/modernize-use-nullptr-basic.cpp +++ b/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/test/clang-tidy/modernize-use-nullptr.cpp b/test/clang-tidy/modernize-use-nullptr.cpp index ef37a91..a18c7a6 100644 --- a/test/clang-tidy/modernize-use-nullptr.cpp +++ b/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/test/clang-tidy/modernize-use-override-cxx98.cpp b/test/clang-tidy/modernize-use-override-cxx98.cpp index c061e8a..41e2b98 100644 --- a/test/clang-tidy/modernize-use-override-cxx98.cpp +++ b/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/test/clang-tidy/modernize-use-override.cpp b/test/clang-tidy/modernize-use-override.cpp index 8d6dfaf..cfd9b0b 100644 --- a/test/clang-tidy/modernize-use-override.cpp +++ b/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/test/clang-tidy/readability-braces-around-statements-few-lines.cpp b/test/clang-tidy/readability-braces-around-statements-few-lines.cpp index db01ccd..0165336 100644 --- a/test/clang-tidy/readability-braces-around-statements-few-lines.cpp +++ b/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/test/clang-tidy/readability-braces-around-statements-same-line.cpp b/test/clang-tidy/readability-braces-around-statements-same-line.cpp index 1f6f0c0..2f0cc46 100644 --- a/test/clang-tidy/readability-braces-around-statements-same-line.cpp +++ b/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/test/clang-tidy/readability-braces-around-statements-single-line.cpp b/test/clang-tidy/readability-braces-around-statements-single-line.cpp index 96d91ae..7352c8b 100644 --- a/test/clang-tidy/readability-braces-around-statements-single-line.cpp +++ b/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/test/clang-tidy/readability-braces-around-statements.cpp b/test/clang-tidy/readability-braces-around-statements.cpp index 485a13a..ee147f6 100644 --- a/test/clang-tidy/readability-braces-around-statements.cpp +++ b/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/test/clang-tidy/readability-container-size-empty.cpp b/test/clang-tidy/readability-container-size-empty.cpp index 6443bde..9dea5dc 100644 --- a/test/clang-tidy/readability-container-size-empty.cpp +++ b/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 struct vector { diff --git a/test/clang-tidy/readability-else-after-return.cpp b/test/clang-tidy/readability-else-after-return.cpp index f345be5..28fd2ec 100644 --- a/test/clang-tidy/readability-else-after-return.cpp +++ b/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/test/clang-tidy/readability-function-size.cpp b/test/clang-tidy/readability-function-size.cpp index 7bf2eff..9536bb6 100644 --- a/test/clang-tidy/readability-function-size.cpp +++ b/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/test/clang-tidy/readability-identifier-naming.cpp b/test/clang-tidy/readability-identifier-naming.cpp index 681fd7e..a97f8e9 100644 --- a/test/clang-tidy/readability-identifier-naming.cpp +++ b/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/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp b/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp index 15dbeb1..55a9a5f 100644 --- a/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp +++ b/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/test/clang-tidy/readability-named-parameter.cpp b/test/clang-tidy/readability-named-parameter.cpp index ddd9671..f2d31e2 100644 --- a/test/clang-tidy/readability-named-parameter.cpp +++ b/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/test/clang-tidy/readability-redundant-smartptr-get.cpp b/test/clang-tidy/readability-redundant-smartptr-get.cpp index 0c1e200..2840ab2 100644 --- a/test/clang-tidy/readability-redundant-smartptr-get.cpp +++ b/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/test/clang-tidy/readability-redundant-string-cstr.cpp b/test/clang-tidy/readability-redundant-string-cstr.cpp index 9c610ea..e6f6328 100644 --- a/test/clang-tidy/readability-redundant-string-cstr.cpp +++ b/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 diff --git a/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-assignment.cpp b/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-assignment.cpp index 3951849..b0e85df 100644 --- a/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-assignment.cpp +++ b/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/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-return.cpp b/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-return.cpp index 3400cc2..d002191 100644 --- a/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-return.cpp +++ b/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/test/clang-tidy/readability-simplify-bool-expr.cpp b/test/clang-tidy/readability-simplify-bool-expr.cpp index 327a92d..58cb416 100644 --- a/test/clang-tidy/readability-simplify-bool-expr.cpp +++ b/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/test/clang-tidy/readability-uniqueptr-delete-release.cpp b/test/clang-tidy/readability-uniqueptr-delete-release.cpp index 8fb7562..aa8ae25 100644 --- a/test/clang-tidy/readability-uniqueptr-delete-release.cpp +++ b/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 diff --git a/test/lit.cfg b/test/lit.cfg index 21f353a..e6dab49 100644 --- a/test/lit.cfg +++ b/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)) )