[clang-tools-extra] r280839 - Resubmit "Add a test for clang-tidy using the clang-cl driver."
Zachary Turner via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 7 11:28:42 PDT 2016
Author: zturner
Date: Wed Sep 7 13:28:42 2016
New Revision: 280839
URL: http://llvm.org/viewvc/llvm-project?rev=280839&view=rev
Log:
Resubmit "Add a test for clang-tidy using the clang-cl driver."
This was originally reverted because the patch on the clang
tooling side was reverted. That patch is being resubmitted,
so this patch is resubmitted as well.
Added:
clang-tools-extra/trunk/test/clang-tidy/clang-cl-driver.cpp
Added: clang-tools-extra/trunk/test/clang-tidy/clang-cl-driver.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/clang-cl-driver.cpp?rev=280839&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/clang-cl-driver.cpp (added)
+++ clang-tools-extra/trunk/test/clang-tidy/clang-cl-driver.cpp Wed Sep 7 13:28:42 2016
@@ -0,0 +1,17 @@
+// RUN: clang-tidy -checks=-*,modernize-use-nullptr %s -- --driver-mode=cl /DTEST1 /DFOO=foo /DBAR=bar | FileCheck -implicit-check-not="{{warning|error}}:" %s
+int *a = 0;
+// CHECK: :[[@LINE-1]]:10: warning: use nullptr
+#ifdef TEST1
+int *b = 0;
+// CHECK: :[[@LINE-1]]:10: warning: use nullptr
+#endif
+#define foo 1
+#define bar 1
+#if FOO
+int *c = 0;
+// CHECK: :[[@LINE-1]]:10: warning: use nullptr
+#endif
+#if BAR
+int *d = 0;
+// CHECK: :[[@LINE-1]]:10: warning: use nullptr
+#endif
More information about the cfe-commits
mailing list