[PATCH] D22729: MPIBufferDerefCheck for Clang-Tidy

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 1 01:38:42 PDT 2016


hokein added a comment.

Looks like the dependency of this patch https://reviews.llvm.org/D21962 got reverted by some reasons.


================
Comment at: clang-tidy/mpi/BufferDerefCheck.cpp:63
@@ +62,3 @@
+    if (FuncClassifier.isReduceType(Identifier)) {
+      addBuffer(0);
+      addBuffer(1);
----------------
Could you add some comments to describe what these statements do? It's confused when reading the magic number parameter. The same below.

================
Comment at: clang-tidy/mpi/BufferDerefCheck.cpp:109
@@ +108,3 @@
+      std::string IndirectionDesc;
+      for (int i = Indirections.size() - 1; i >= 0; --i) {
+        if (Indirections[i] == IndirectionType::Pointer) {
----------------
size_t


https://reviews.llvm.org/D22729





More information about the cfe-commits mailing list