[PATCH] Add an argument comment checker to clang-tidy.

Alexander Kornienko alexfh at google.com
Mon Mar 3 05:58:21 PST 2014


  A few more comments on the test.


================
Comment at: test/clang-tidy/llvm-arg-comments.cpp:1
@@ +1,2 @@
+// RUN: clang-tidy --checks=llvm-argument-comment %s -- > %t.cpp
+// RUN: FileCheck -input-file=%t.cpp %s
----------------
You could also avoid using a temporary file and just pipe the clang-tidy output to FileCheck.

================
Comment at: test/clang-tidy/llvm-arg-comments.cpp:3
@@ +2,3 @@
+// RUN: FileCheck -input-file=%t.cpp %s
+
+void f(int x, int y);
----------------
Please add 

  // CHECK-NOT: warning

here and in the end of the file. I didn't find a better way to check for the absence of the unexpected diagnostics. Maybe we should implement -verify in clang-tidy as it's done in Clang.


http://llvm-reviews.chandlerc.com/D2914



More information about the cfe-commits mailing list