[clang-tools-extra] r220633 - [clang-tidy] Clean up test.

Alexander Kornienko alexfh at google.com
Sat Oct 25 19:21:32 PDT 2014


Author: alexfh
Date: Sat Oct 25 21:21:32 2014
New Revision: 220633

URL: http://llvm.org/viewvc/llvm-project?rev=220633&view=rev
Log:
[clang-tidy] Clean up test.

Simplify RUN lines and make checks stricter, check messages instead of fixes.

Modified:
    clang-tools-extra/trunk/test/clang-tidy/select-checks.cpp

Modified: clang-tools-extra/trunk/test/clang-tidy/select-checks.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/select-checks.cpp?rev=220633&r1=220632&r2=220633&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/select-checks.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/select-checks.cpp Sat Oct 25 21:21:32 2014
@@ -1,13 +1,11 @@
-// 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
+// RUN: clang-tidy %s -checks='-*,llvm-namespace-*' -- 2>&1 | FileCheck -implicit-check-not='{{warning:|error:}}' %s
+// RUN: clang-tidy %s -checks='-*,an-unknown-check' -- 2>&1 | FileCheck -implicit-check-not='{{warning:|error:}}' -check-prefix=CHECK2 %s
 
 // CHECK2: Error: no checks enabled.
 
 namespace i {
 }
-// CHECK: } // namespace i
+// CHECK: :[[@LINE-2]]:11: warning: namespace not terminated with a closing comment [llvm-namespace-comment]
 
-class A { A(int i); }; // Not fixing this, because the check is in google-.
-// CHECK: class A { A(int i); };
+// Expect no warnings from the google-explicit-constructor check:
+class A { A(int i); };





More information about the cfe-commits mailing list