[clang-tools-extra] r245583 - [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests.
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 20 10:58:08 PDT 2015
Author: alexfh
Date: Thu Aug 20 12:58:07 2015
New Revision: 245583
URL: http://llvm.org/viewvc/llvm-project?rev=245583&view=rev
Log:
[clang-tidy] Use a python script instead of a shell script to run clang-tidy tests.
Summary:
Add check_clang_tidy.py script that is functionally identical to the
check_clang_tidy.py, but should also be functional on windows.
I've verified that the script works on linux. Would be nice if folks using
Windows could test the patch before I break windows bots ;)
Reviewers: chapuni, aaron.ballman
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D12180
Added:
clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.py (with props)
Modified:
clang-tools-extra/trunk/test/clang-tidy/arg-comments.cpp
clang-tools-extra/trunk/test/clang-tidy/google-explicit-constructor.cpp
clang-tools-extra/trunk/test/clang-tidy/google-explicit-make-pair.cpp
clang-tools-extra/trunk/test/clang-tidy/google-member-string-references.cpp
clang-tools-extra/trunk/test/clang-tidy/google-memset-zero-length.cpp
clang-tools-extra/trunk/test/clang-tidy/google-overloaded-unary-and.cpp
clang-tools-extra/trunk/test/clang-tidy/google-readability-casting.c
clang-tools-extra/trunk/test/clang-tidy/google-readability-casting.cpp
clang-tools-extra/trunk/test/clang-tidy/google-readability-namespace-comments.cpp
clang-tools-extra/trunk/test/clang-tidy/google-readability-todo.cpp
clang-tools-extra/trunk/test/clang-tidy/google-runtime-int.cpp
clang-tools-extra/trunk/test/clang-tidy/llvm-include-order.cpp
clang-tools-extra/trunk/test/clang-tidy/llvm-twine-local.cpp
clang-tools-extra/trunk/test/clang-tidy/misc-assert-side-effect.cpp
clang-tools-extra/trunk/test/clang-tidy/misc-assign-operator-signature.cpp
clang-tools-extra/trunk/test/clang-tidy/misc-bool-pointer-implicit-conversion.cpp
clang-tools-extra/trunk/test/clang-tidy/misc-inaccurate-erase.cpp
clang-tools-extra/trunk/test/clang-tidy/misc-inefficient-algorithm.cpp
clang-tools-extra/trunk/test/clang-tidy/misc-macro-parentheses.cpp
clang-tools-extra/trunk/test/clang-tidy/misc-noexcept-move-constructor.cpp
clang-tools-extra/trunk/test/clang-tidy/misc-repeated-side-effects-in-macro.c
clang-tools-extra/trunk/test/clang-tidy/misc-static-assert.cpp
clang-tools-extra/trunk/test/clang-tidy/misc-swapped-arguments.cpp
clang-tools-extra/trunk/test/clang-tidy/misc-undelegated-constructor.cpp
clang-tools-extra/trunk/test/clang-tidy/misc-uniqueptr-reset-release.cpp
clang-tools-extra/trunk/test/clang-tidy/misc-unused-alias-decls.cpp
clang-tools-extra/trunk/test/clang-tidy/misc-unused-parameters.c
clang-tools-extra/trunk/test/clang-tidy/misc-unused-parameters.cpp
clang-tools-extra/trunk/test/clang-tidy/misc-unused-raii.cpp
clang-tools-extra/trunk/test/clang-tidy/misc-use-override-cxx98.cpp
clang-tools-extra/trunk/test/clang-tidy/misc-use-override.cpp
clang-tools-extra/trunk/test/clang-tidy/modernize-loop-convert-basic.cpp
clang-tools-extra/trunk/test/clang-tidy/modernize-loop-convert-extra.cpp
clang-tools-extra/trunk/test/clang-tidy/modernize-loop-convert-negative.cpp
clang-tools-extra/trunk/test/clang-tidy/modernize-pass-by-value.cpp
clang-tools-extra/trunk/test/clang-tidy/modernize-use-nullptr-basic.cpp
clang-tools-extra/trunk/test/clang-tidy/modernize-use-nullptr.cpp
clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements-few-lines.cpp
clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements-same-line.cpp
clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements-single-line.cpp
clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements.cpp
clang-tools-extra/trunk/test/clang-tidy/readability-container-size-empty.cpp
clang-tools-extra/trunk/test/clang-tidy/readability-else-after-return.cpp
clang-tools-extra/trunk/test/clang-tidy/readability-function-size.cpp
clang-tools-extra/trunk/test/clang-tidy/readability-identifier-naming.cpp
clang-tools-extra/trunk/test/clang-tidy/readability-named-parameter.cpp
clang-tools-extra/trunk/test/clang-tidy/readability-redundant-smartptr-get.cpp
clang-tools-extra/trunk/test/clang-tidy/readability-redundant-string-cstr.cpp
clang-tools-extra/trunk/test/clang-tidy/readability-shrink-to-fit.cpp
clang-tools-extra/trunk/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-assignment.cpp
clang-tools-extra/trunk/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-return.cpp
clang-tools-extra/trunk/test/clang-tidy/readability-simplify-bool-expr.cpp
Modified: clang-tools-extra/trunk/test/clang-tidy/arg-comments.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/arg-comments.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/arg-comments.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/arg-comments.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-argument-comment %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s misc-argument-comment %t
// FIXME: clang-tidy should provide a -verify mode to make writing these checks
// easier and more accurate.
Added: clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.py
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.py?rev=245583&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.py (added)
+++ clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.py Thu Aug 20 12:58:07 2015
@@ -0,0 +1,113 @@
+#!/usr/bin/python
+#
+#===- check_clang_tidy.py - ClangTidy Test Helper ------------*- python -*--===#
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+#===------------------------------------------------------------------------===#
+
+r"""
+ClangTidy Test Helper
+=====================
+
+This script runs clang-tidy in fix mode and verify fixes, messages or both.
+
+Usage:
+ check_clang_tidy.py <source-file> <check-name> <temp-file> \
+ [optional clang-tidy arguments]
+
+Example:
+ // RUN: %python %S/check_clang_tidy.py %s llvm-include-order %t -- -isystem $(dirname %s)/Inputs/Headers
+"""
+
+import re
+import subprocess
+import sys
+
+
+def write_file(file_name, text):
+ with open(file_name, 'w') as f:
+ f.write(text)
+ f.truncate()
+
+def main():
+ if len(sys.argv) < 4:
+ sys.exit('Not enough arguments.')
+
+ input_file_name = sys.argv[1]
+ check_name = sys.argv[2]
+ temp_file_name = sys.argv[3] + '.cpp'
+
+ clang_tidy_extra_args = sys.argv[4:]
+ if len(clang_tidy_extra_args) == 0:
+ clang_tidy_extra_args = ['--', '--std=c++11']
+
+ with open(input_file_name, 'r') as input_file:
+ input_text = input_file.read()
+
+ has_check_fixes = input_text.find('CHECK-FIXES') >= 0
+ has_check_messages = input_text.find('CHECK-MESSAGES') >= 0
+
+ if not has_check_fixes and not has_check_messages:
+ sys.exit('Neither CHECK-FIXES nor CHECK-MESSAGES found in the input')
+
+ # Remove the contents of the CHECK lines to avoid CHECKs matching on
+ # themselves. We need to keep the comments to preserve line numbers while
+ # avoiding empty lines which could potentially trigger formatting-related
+ # checks.
+ cleaned_test = re.sub('// *CHECK-[A-Z-]*:[^\r\n]*', '//', input_text)
+
+ write_file(temp_file_name, cleaned_test)
+
+ original_file_name = temp_file_name + ".orig"
+ write_file(original_file_name, cleaned_test)
+
+ args = ['clang-tidy', temp_file_name, '-fix', '--checks=-*,' + check_name] + \
+ clang_tidy_extra_args
+ print('Running ' + repr(args) + '...')
+ clang_tidy_output = \
+ subprocess.check_output(args, stderr=subprocess.STDOUT).decode()
+
+ print('------------------------ clang-tidy output -----------------------\n' +
+ clang_tidy_output +
+ '\n------------------------------------------------------------------')
+
+ try:
+ diff_output = subprocess.check_output(
+ ['diff', '-u', original_file_name, temp_file_name],
+ stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as e:
+ diff_output = e.output
+
+ print('------------------------------ Fixes -----------------------------\n' +
+ diff_output.decode() +
+ '\n------------------------------------------------------------------')
+
+ if has_check_fixes:
+ try:
+ subprocess.check_output(
+ ['FileCheck', '-input-file=' + temp_file_name, input_file_name,
+ '-check-prefix=CHECK-FIXES', '-strict-whitespace'],
+ stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as e:
+ print('FileCheck failed:\n' + e.output)
+ raise
+
+ if has_check_messages:
+ messages_file = temp_file_name + '.msg'
+ write_file(messages_file, clang_tidy_output)
+ try:
+ subprocess.check_output(
+ ['FileCheck', '-input-file=' + messages_file, input_file_name,
+ '-check-prefix=CHECK-MESSAGES',
+ '-implicit-check-not={{warning|error}}:'],
+ stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as e:
+ print('FileCheck failed:\n' + e.output)
+ raise
+
+if __name__ == '__main__':
+ main()
Propchange: clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.py
------------------------------------------------------------------------------
svn:executable = *
Modified: clang-tools-extra/trunk/test/clang-tidy/google-explicit-constructor.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/google-explicit-constructor.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/google-explicit-constructor.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/google-explicit-constructor.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s google-explicit-constructor %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s google-explicit-constructor %t
namespace std {
typedef decltype(sizeof(int)) size_t;
Modified: clang-tools-extra/trunk/test/clang-tidy/google-explicit-make-pair.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/google-explicit-make-pair.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/google-explicit-make-pair.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/google-explicit-make-pair.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s google-build-explicit-make-pair %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s google-build-explicit-make-pair %t
namespace std {
template <class T1, class T2>
Modified: clang-tools-extra/trunk/test/clang-tidy/google-member-string-references.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/google-member-string-references.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/google-member-string-references.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/google-member-string-references.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s google-runtime-member-string-references %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s google-runtime-member-string-references %t
namespace std {
template<typename T>
Modified: clang-tools-extra/trunk/test/clang-tidy/google-memset-zero-length.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/google-memset-zero-length.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/google-memset-zero-length.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/google-memset-zero-length.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s google-runtime-memset %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s google-runtime-memset %t
void *memset(void *, int, __SIZE_TYPE__);
Modified: clang-tools-extra/trunk/test/clang-tidy/google-overloaded-unary-and.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/google-overloaded-unary-and.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/google-overloaded-unary-and.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/google-overloaded-unary-and.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s google-runtime-operator %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s google-runtime-operator %t
struct Foo {
void *operator&();
Modified: clang-tools-extra/trunk/test/clang-tidy/google-readability-casting.c
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/google-readability-casting.c?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/google-readability-casting.c (original)
+++ clang-tools-extra/trunk/test/clang-tidy/google-readability-casting.c Thu Aug 20 12:58:07 2015
@@ -1,10 +1,9 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s google-readability-casting %t -- -x c
+// RUN: %python %S/check_clang_tidy.py %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}}:'
// RUN: cp %s %t.main_file.cpp
// RUN: clang-tidy --checks=-*,google-readability-casting -header-filter='.*' %t.main_file.cpp -- -I%S -DTEST_INCLUDE -x c++ | FileCheck %s -check-prefix=CHECK-MESSAGES -implicit-check-not='{{warning|error}}:'
-// REQUIRES: shell
#ifdef TEST_INCLUDE
Modified: clang-tools-extra/trunk/test/clang-tidy/google-readability-casting.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/google-readability-casting.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/google-readability-casting.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/google-readability-casting.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s google-readability-casting %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s google-readability-casting %t
bool g() { return false; }
Modified: clang-tools-extra/trunk/test/clang-tidy/google-readability-namespace-comments.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/google-readability-namespace-comments.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/google-readability-namespace-comments.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/google-readability-namespace-comments.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s google-readability-namespace-comments %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s google-readability-namespace-comments %t
namespace n1 {
namespace n2 {
Modified: clang-tools-extra/trunk/test/clang-tidy/google-readability-todo.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/google-readability-todo.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/google-readability-todo.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/google-readability-todo.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s google-readability-todo %t -config="{User: 'some user'}" --
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s google-readability-todo %t -config="{User: 'some user'}" --
// TODOfix this1
// CHECK-MESSAGES: [[@LINE-1]]:1: warning: missing username/bug in TODO
Modified: clang-tools-extra/trunk/test/clang-tidy/google-runtime-int.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/google-runtime-int.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/google-runtime-int.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/google-runtime-int.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s google-runtime-int %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s google-runtime-int %t
long a();
// CHECK-MESSAGES: [[@LINE-1]]:1: warning: consider replacing 'long' with 'int{{..}}'
Modified: clang-tools-extra/trunk/test/clang-tidy/llvm-include-order.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/llvm-include-order.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/llvm-include-order.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/llvm-include-order.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s llvm-include-order %t -- -isystem %S/Inputs/Headers
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s llvm-include-order %t -- -isystem %S/Inputs/Headers
// FIXME: Investigating.
// XFAIL: win32
Modified: clang-tools-extra/trunk/test/clang-tidy/llvm-twine-local.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/llvm-twine-local.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/llvm-twine-local.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/llvm-twine-local.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s llvm-twine-local %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s llvm-twine-local %t
namespace llvm {
class Twine {
Modified: clang-tools-extra/trunk/test/clang-tidy/misc-assert-side-effect.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-assert-side-effect.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/misc-assert-side-effect.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/misc-assert-side-effect.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %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'}]}" -- -fexceptions
-// REQUIRES: shell
+// 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'}]}" -- -fexceptions
//===--- assert definition block ------------------------------------------===//
int abort() { return 0; }
Modified: clang-tools-extra/trunk/test/clang-tidy/misc-assign-operator-signature.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-assign-operator-signature.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/misc-assign-operator-signature.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/misc-assign-operator-signature.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-assign-operator-signature %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s misc-assign-operator-signature %t
struct Good {
Good& operator=(const Good&);
Modified: clang-tools-extra/trunk/test/clang-tidy/misc-bool-pointer-implicit-conversion.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-bool-pointer-implicit-conversion.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/misc-bool-pointer-implicit-conversion.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/misc-bool-pointer-implicit-conversion.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-bool-pointer-implicit-conversion %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s misc-bool-pointer-implicit-conversion %t
bool *SomeFunction();
void SomeOtherFunction(bool*);
Modified: clang-tools-extra/trunk/test/clang-tidy/misc-inaccurate-erase.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-inaccurate-erase.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/misc-inaccurate-erase.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/misc-inaccurate-erase.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-inaccurate-erase %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s misc-inaccurate-erase %t
namespace std {
template <typename T> struct vec_iterator {
Modified: clang-tools-extra/trunk/test/clang-tidy/misc-inefficient-algorithm.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-inefficient-algorithm.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/misc-inefficient-algorithm.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/misc-inefficient-algorithm.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-inefficient-algorithm %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s misc-inefficient-algorithm %t
namespace std {
template <typename T> struct less {
Modified: clang-tools-extra/trunk/test/clang-tidy/misc-macro-parentheses.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-macro-parentheses.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/misc-macro-parentheses.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/misc-macro-parentheses.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-macro-parentheses %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %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]
Modified: clang-tools-extra/trunk/test/clang-tidy/misc-noexcept-move-constructor.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-noexcept-move-constructor.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/misc-noexcept-move-constructor.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/misc-noexcept-move-constructor.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-noexcept-move-constructor %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s misc-noexcept-move-constructor %t
class A {
A(A &&);
Modified: clang-tools-extra/trunk/test/clang-tidy/misc-repeated-side-effects-in-macro.c
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-repeated-side-effects-in-macro.c?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/misc-repeated-side-effects-in-macro.c (original)
+++ clang-tools-extra/trunk/test/clang-tidy/misc-repeated-side-effects-in-macro.c Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-macro-repeated-side-effects %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s misc-macro-repeated-side-effects %t
#define badA(x,y) ((x)+((x)+(y))+(y))
void bad(int ret, int a, int b) {
Modified: clang-tools-extra/trunk/test/clang-tidy/misc-static-assert.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-static-assert.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/misc-static-assert.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/misc-static-assert.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-static-assert %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s misc-static-assert %t
void abort() {}
#ifdef NDEBUG
Modified: clang-tools-extra/trunk/test/clang-tidy/misc-swapped-arguments.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-swapped-arguments.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/misc-swapped-arguments.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/misc-swapped-arguments.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-swapped-arguments %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s misc-swapped-arguments %t
void F(int, double);
Modified: clang-tools-extra/trunk/test/clang-tidy/misc-undelegated-constructor.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-undelegated-constructor.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/misc-undelegated-constructor.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/misc-undelegated-constructor.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-undelegated-constructor %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s misc-undelegated-constructor %t
struct Ctor;
Ctor foo();
Modified: clang-tools-extra/trunk/test/clang-tidy/misc-uniqueptr-reset-release.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-uniqueptr-reset-release.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/misc-uniqueptr-reset-release.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/misc-uniqueptr-reset-release.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-uniqueptr-reset-release %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s misc-uniqueptr-reset-release %t
namespace std {
Modified: clang-tools-extra/trunk/test/clang-tidy/misc-unused-alias-decls.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-unused-alias-decls.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/misc-unused-alias-decls.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/misc-unused-alias-decls.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-unused-alias-decls %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s misc-unused-alias-decls %t
namespace my_namespace {
class C {};
Modified: clang-tools-extra/trunk/test/clang-tidy/misc-unused-parameters.c
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-unused-parameters.c?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/misc-unused-parameters.c (original)
+++ clang-tools-extra/trunk/test/clang-tidy/misc-unused-parameters.c Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-unused-parameters %t -- -xc
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s misc-unused-parameters %t -- -xc
// Basic removal
// =============
Modified: clang-tools-extra/trunk/test/clang-tidy/misc-unused-parameters.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-unused-parameters.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/misc-unused-parameters.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/misc-unused-parameters.cpp Thu Aug 20 12:58:07 2015
@@ -1,8 +1,7 @@
// RUN: echo "static void staticFunctionHeader(int i) {}" > %T/header.h
// RUN: echo "static void staticFunctionHeader(int /*i*/) {}" > %T/header-fixed.h
-// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-unused-parameters %t -header-filter='.*' -- -fno-delayed-template-parsing
+// RUN: %python %S/check_clang_tidy.py %s misc-unused-parameters %t -header-filter='.*' -- -fno-delayed-template-parsing
// RUN: diff %T/header.h %T/header-fixed.h
-// REQUIRES: shell
#include "header.h"
// CHECK-MESSAGES: header.h:1:38: warning
Modified: clang-tools-extra/trunk/test/clang-tidy/misc-unused-raii.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-unused-raii.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/misc-unused-raii.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/misc-unused-raii.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-unused-raii %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s misc-unused-raii %t
struct Foo {
Foo();
Modified: clang-tools-extra/trunk/test/clang-tidy/misc-use-override-cxx98.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-use-override-cxx98.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/misc-use-override-cxx98.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/misc-use-override-cxx98.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-use-override %t -- -std=c++98
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s misc-use-override %t -- -std=c++98
struct Base {
virtual ~Base() {}
Modified: clang-tools-extra/trunk/test/clang-tidy/misc-use-override.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/misc-use-override.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/misc-use-override.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/misc-use-override.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-use-override %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s misc-use-override %t
#define ABSTRACT = 0
Modified: clang-tools-extra/trunk/test/clang-tidy/modernize-loop-convert-basic.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/modernize-loop-convert-basic.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/modernize-loop-convert-basic.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/modernize-loop-convert-basic.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s modernize-loop-convert %t -- -std=c++11 -I %S/Inputs/modernize-loop-convert
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s modernize-loop-convert %t -- -std=c++11 -I %S/Inputs/modernize-loop-convert
#include "structures.h"
Modified: clang-tools-extra/trunk/test/clang-tidy/modernize-loop-convert-extra.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/modernize-loop-convert-extra.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/modernize-loop-convert-extra.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/modernize-loop-convert-extra.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s modernize-loop-convert %t -- -std=c++11 -I %S/Inputs/modernize-loop-convert
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s modernize-loop-convert %t -- -std=c++11 -I %S/Inputs/modernize-loop-convert
#include "structures.h"
Modified: clang-tools-extra/trunk/test/clang-tidy/modernize-loop-convert-negative.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/modernize-loop-convert-negative.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/modernize-loop-convert-negative.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/modernize-loop-convert-negative.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s modernize-loop-convert %t -- -std=c++11 -I %S/Inputs/modernize-loop-convert
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s modernize-loop-convert %t -- -std=c++11 -I %S/Inputs/modernize-loop-convert
#include "structures.h"
Modified: clang-tools-extra/trunk/test/clang-tidy/modernize-pass-by-value.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/modernize-pass-by-value.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/modernize-pass-by-value.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/modernize-pass-by-value.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s modernize-pass-by-value %t -- -std=c++11 -fno-delayed-template-parsing
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s modernize-pass-by-value %t -- -std=c++11 -fno-delayed-template-parsing
// CHECK-FIXES: #include <utility>
Modified: clang-tools-extra/trunk/test/clang-tidy/modernize-use-nullptr-basic.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/modernize-use-nullptr-basic.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/modernize-use-nullptr-basic.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/modernize-use-nullptr-basic.cpp Thu Aug 20 12:58:07 2015
@@ -1,6 +1,5 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s modernize-use-nullptr %t -- \
+// RUN: %python %S/check_clang_tidy.py %s modernize-use-nullptr %t -- \
// RUN: -std=c++98 -Wno-non-literal-null-conversion
-// REQUIRES: shell
const unsigned int g_null = 0;
#define NULL 0
Modified: clang-tools-extra/trunk/test/clang-tidy/modernize-use-nullptr.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/modernize-use-nullptr.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/modernize-use-nullptr.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/modernize-use-nullptr.cpp Thu Aug 20 12:58:07 2015
@@ -1,7 +1,6 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s modernize-use-nullptr %t \
+// RUN: %python %S/check_clang_tidy.py %s modernize-use-nullptr %t \
// RUN: -config="{CheckOptions: [{key: modernize-use-nullptr.NullMacros, value: 'MY_NULL,NULL'}]}" \
// RUN: -- -std=c++11
-// REQUIRES: shell
#define NULL 0
Modified: clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements-few-lines.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements-few-lines.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements-few-lines.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements-few-lines.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s readability-braces-around-statements %t -config="{CheckOptions: [{key: readability-braces-around-statements.ShortStatementLines, value: 4}]}" --
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s readability-braces-around-statements %t -config="{CheckOptions: [{key: readability-braces-around-statements.ShortStatementLines, value: 4}]}" --
void do_something(const char *) {}
Modified: clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements-same-line.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements-same-line.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements-same-line.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements-same-line.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s readability-braces-around-statements %t -config="{CheckOptions: [{key: readability-braces-around-statements.ShortStatementLines, value: 1}]}" --
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s readability-braces-around-statements %t -config="{CheckOptions: [{key: readability-braces-around-statements.ShortStatementLines, value: 1}]}" --
void do_something(const char *) {}
Modified: clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements-single-line.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements-single-line.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements-single-line.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements-single-line.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s readability-braces-around-statements %t -config="{CheckOptions: [{key: readability-braces-around-statements.ShortStatementLines, value: 2}]}" --
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s readability-braces-around-statements %t -config="{CheckOptions: [{key: readability-braces-around-statements.ShortStatementLines, value: 2}]}" --
void do_something(const char *) {}
Modified: clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/readability-braces-around-statements.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s readability-braces-around-statements %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s readability-braces-around-statements %t
void do_something(const char *) {}
Modified: clang-tools-extra/trunk/test/clang-tidy/readability-container-size-empty.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-container-size-empty.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/readability-container-size-empty.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/readability-container-size-empty.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s readability-container-size-empty %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s readability-container-size-empty %t
namespace std {
template <typename T> struct vector {
Modified: clang-tools-extra/trunk/test/clang-tidy/readability-else-after-return.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-else-after-return.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/readability-else-after-return.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/readability-else-after-return.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s readability-else-after-return %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s readability-else-after-return %t
void f(int a) {
if (a > 0)
Modified: clang-tools-extra/trunk/test/clang-tidy/readability-function-size.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-function-size.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/readability-function-size.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/readability-function-size.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %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
-// REQUIRES: shell
+// 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
void foo1() {
}
Modified: clang-tools-extra/trunk/test/clang-tidy/readability-identifier-naming.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-identifier-naming.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/readability-identifier-naming.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/readability-identifier-naming.cpp Thu Aug 20 12:58:07 2015
@@ -1,4 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s readability-identifier-naming %t \
+// RUN: %python %S/check_clang_tidy.py %s readability-identifier-naming %t \
// RUN: -config='{CheckOptions: [ \
// RUN: {key: readability-identifier-naming.AbstractClassCase, value: CamelCase}, \
// RUN: {key: readability-identifier-naming.AbstractClassPrefix, value: 'A'}, \
@@ -63,7 +63,6 @@
// RUN: {key: readability-identifier-naming.VirtualMethodPrefix, value: 'v_'}, \
// RUN: {key: readability-identifier-naming.IgnoreFailedSplit, value: 0} \
// RUN: ]}' -- -std=c++11 -fno-delayed-template-parsing
-// REQUIRES: shell
// FIXME: There should be more test cases for checking that references to class
// FIXME: name, declaration contexts, forward declarations, etc, are correctly
Modified: clang-tools-extra/trunk/test/clang-tidy/readability-named-parameter.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-named-parameter.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/readability-named-parameter.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/readability-named-parameter.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s readability-named-parameter %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s readability-named-parameter %t
void Method(char *) { /* */ }
// CHECK-MESSAGES: :[[@LINE-1]]:19: warning: all parameters should be named in a function
Modified: clang-tools-extra/trunk/test/clang-tidy/readability-redundant-smartptr-get.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-redundant-smartptr-get.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/readability-redundant-smartptr-get.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/readability-redundant-smartptr-get.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s readability-redundant-smartptr-get %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s readability-redundant-smartptr-get %t
#define NULL __null
Modified: clang-tools-extra/trunk/test/clang-tidy/readability-redundant-string-cstr.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-redundant-string-cstr.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/readability-redundant-string-cstr.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/readability-redundant-string-cstr.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s readability-redundant-string-cstr %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s readability-redundant-string-cstr %t
namespace std {
template <typename T>
Modified: clang-tools-extra/trunk/test/clang-tidy/readability-shrink-to-fit.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-shrink-to-fit.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/readability-shrink-to-fit.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/readability-shrink-to-fit.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s readability-shrink-to-fit %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s readability-shrink-to-fit %t
namespace std {
template <typename T> struct vector { void swap(vector &other); };
Modified: clang-tools-extra/trunk/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-assignment.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-assignment.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-assignment.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-assignment.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s readability-simplify-boolean-expr %t -config="{CheckOptions: [{key: "readability-simplify-boolean-expr.ChainedConditionalAssignment", value: 1}]}" --
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %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;
Modified: clang-tools-extra/trunk/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-return.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-return.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-return.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/readability-simplify-bool-expr-chained-conditional-return.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s readability-simplify-boolean-expr %t -config="{CheckOptions: [{key: "readability-simplify-boolean-expr.ChainedConditionalReturn", value: 1}]}" --
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %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) {
Modified: clang-tools-extra/trunk/test/clang-tidy/readability-simplify-bool-expr.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-simplify-bool-expr.cpp?rev=245583&r1=245582&r2=245583&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/readability-simplify-bool-expr.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/readability-simplify-bool-expr.cpp Thu Aug 20 12:58:07 2015
@@ -1,5 +1,4 @@
-// RUN: $(dirname %s)/check_clang_tidy.sh %s readability-simplify-boolean-expr %t
-// REQUIRES: shell
+// RUN: %python %S/check_clang_tidy.py %s readability-simplify-boolean-expr %t
bool a1 = false;
More information about the cfe-commits
mailing list