summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/run-clang-tidy.cpp
diff options
context:
space:
mode:
authorZinovy Nis <zinovy.nis@gmail.com>2019-03-27 19:21:32 +0000
committerZinovy Nis <zinovy.nis@gmail.com>2019-03-27 19:21:32 +0000
commitf8b7269f983aad40730ad845dae5c3d2f43093b0 (patch)
treec52608e5813983a0d2c4640767205395f770ab2a /clang-tools-extra/test/clang-tidy/run-clang-tidy.cpp
parent1a0a24f1104af4a4b4df80ab729ff3640a44eb70 (diff)
downloadbcm5719-llvm-f8b7269f983aad40730ad845dae5c3d2f43093b0.tar.gz
bcm5719-llvm-f8b7269f983aad40730ad845dae5c3d2f43093b0.zip
[clang-tidy] Handle missing yaml module in run-clang-tidy.py
The Yaml module is missing on some systems and on many of clang buildbots. But the test for run-clang-tidy.py doesn't fail due to 'NOT' statement masking a python runtime error. This patch conditionally imports and enables the yaml module only if it's present in the system. If not, then '-export-fixes' is disabled. Differential Revision: https://reviews.llvm.org/D59734 llvm-svn: 357114
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/run-clang-tidy.cpp')
-rw-r--r--clang-tools-extra/test/clang-tidy/run-clang-tidy.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/run-clang-tidy.cpp b/clang-tools-extra/test/clang-tidy/run-clang-tidy.cpp
index 2207e430fc4..31c4d681ebc 100644
--- a/clang-tools-extra/test/clang-tidy/run-clang-tidy.cpp
+++ b/clang-tools-extra/test/clang-tidy/run-clang-tidy.cpp
@@ -1,3 +1,4 @@
+// RUN: %run_clang_tidy --help
// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: echo "[{\"directory\":\".\",\"command\":\"clang++ -c %/t/test.cpp\",\"file\":\"%/t/test.cpp\"}]" | sed -e 's/\\/\\\\/g' > %t/compile_commands.json
OpenPOWER on IntegriCloud