[PATCH] D21962: MPITypeMismatchCheck for Clang-Tidy

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 22 06:18:43 PDT 2016


alexfh added a comment.

A few more nits. Please ensure the tests pass once you get the mpi module linking to the clang-tidy binary.


================
Comment at: docs/clang-tidy/checks/mpi-type-mismatch.rst:4
@@ +3,3 @@
+mpi-type-mismatch
+======================
+
----------------
Remove extra `=`s.

================
Comment at: docs/clang-tidy/checks/mpi-type-mismatch.rst:12
@@ +11,3 @@
+Example:
+// buffer type matches MPI datatype
+char buf;
----------------
Please make this a code-block (see other .rst files for an example).

================
Comment at: docs/clang-tidy/checks/mpi-type-mismatch.rst:12
@@ +11,3 @@
+Example:
+// buffer type matches MPI datatype
+char buf;
----------------
alexfh wrote:
> Please make this a code-block (see other .rst files for an example).
Comments should be valid English prose including correct capitalization and punctuation (http://llvm.org/docs/CodingStandards.html#commenting). In code snippets inside documentation as well.

================
Comment at: test/clang-tidy/Inputs/mpi-type-mismatch/mpimock.h:8
@@ +7,3 @@
+
+// mock types
+typedef int MPI_Datatype;
----------------
Use proper capitalization and punctuation, please.

================
Comment at: test/clang-tidy/mpi-type-mismatch.cpp:12
@@ +11,3 @@
+  MPI_Send(&buf2, 1, MPI_CHAR, 0, 0, MPI_COMM_WORLD);
+  // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: buffer type 'int' does not match the MPI datatype 'MPI_CHAR' [mpi-type-mismatch]
+  
----------------
Please leave the first CHECK-MESSAGES as is, but remove the common suffix ` [mpi-type-mismatch]` from all other messages. This makes the test a bit easier to read.


https://reviews.llvm.org/D21962





More information about the cfe-commits mailing list