summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/clang-cl-driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/clang-cl-driver.cpp')
-rw-r--r--clang-tools-extra/test/clang-tidy/clang-cl-driver.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/clang-cl-driver.cpp b/clang-tools-extra/test/clang-tidy/clang-cl-driver.cpp
new file mode 100644
index 00000000000..fac03628233
--- /dev/null
+++ b/clang-tools-extra/test/clang-tidy/clang-cl-driver.cpp
@@ -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
OpenPOWER on IntegriCloud