hokein accepted this revision.
hokein added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clang-tidy/android/CloexecPipeCheck.cpp:31
+      Result,
+      "prefer pipe2() to pipe() because pipe2() allows O_CLOEXEC",
+      ReplacementText);
----------------
the message doesn't seem to explain the reason, especially to the people who 
are not familiar with the `pipe` API, maybe `prefer pipe2() to pipe() to avoid 
file descriptor leakage` is clearer?

Ah, it looks like you are following the existing `CloexecCreatCheck` check, no 
need to do it in this patch. 


================
Comment at: clang-tools-extra/test/clang-tidy/android-cloexec-pipe.cpp:17
+  pipe(pipefd);
+  // CHECK-MESSAGES-NOT: warning:
+}
----------------
nit: no need to do it explicitly, if a warning is shown unexpectedly, the test 
will fail.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61967/new/

https://reviews.llvm.org/D61967



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to