[PATCH] D23480: Add a test for clang-tidy using the clang cl driver

Zachary Turner via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 17 13:22:10 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL278968: Add a test for clang-tidy using the clang-cl driver. (authored by zturner).

Changed prior to commit:
  https://reviews.llvm.org/D23480?vs=67948&id=68413#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D23480

Files:
  clang-tools-extra/trunk/test/clang-tidy/clang-cl-driver.cpp

Index: clang-tools-extra/trunk/test/clang-tidy/clang-cl-driver.cpp
===================================================================
--- clang-tools-extra/trunk/test/clang-tidy/clang-cl-driver.cpp
+++ clang-tools-extra/trunk/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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23480.68413.patch
Type: text/x-patch
Size: 774 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160817/23cee7fc/attachment-0001.bin>


More information about the cfe-commits mailing list