summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/select-checks.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2014-06-02 20:32:06 +0000
committerAlexander Kornienko <alexfh@google.com>2014-06-02 20:32:06 +0000
commitfbf9258582eaa39ed92a3acdfaae232dbb1f8ff5 (patch)
treec29c51ee5cd7424a4bcd438620e87c48705e0c36 /clang-tools-extra/test/clang-tidy/select-checks.cpp
parent5ce26687f2931e3961746f95704f19f2813cb1de (diff)
downloadbcm5719-llvm-fbf9258582eaa39ed92a3acdfaae232dbb1f8ff5.tar.gz
bcm5719-llvm-fbf9258582eaa39ed92a3acdfaae232dbb1f8ff5.zip
Exit with error when no checks enabled.
Summary: This seems like a more appropriate reaction to the user specifying a single check with a wrong name, for example. Reviewers: klimek Reviewed By: klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3981 llvm-svn: 210043
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/select-checks.cpp')
-rw-r--r--clang-tools-extra/test/clang-tidy/select-checks.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/select-checks.cpp b/clang-tools-extra/test/clang-tidy/select-checks.cpp
index 09860a35aca..ce3d4f13ace 100644
--- a/clang-tools-extra/test/clang-tidy/select-checks.cpp
+++ b/clang-tools-extra/test/clang-tidy/select-checks.cpp
@@ -1,6 +1,9 @@
// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp
// RUN: clang-tidy %t.cpp -fix -checks='-*,llvm-*' --
// RUN: FileCheck -input-file=%t.cpp %s
+// RUN: clang-tidy %s -checks='-*,an-unknown-check' -- 2>&1 | FileCheck -check-prefix=CHECK2 %s
+
+// CHECK2: Error: no checks enabled.
namespace i {
}
OpenPOWER on IntegriCloud