[PATCH] D62049: [clang-tidy] Add a close-on-exec check on pipe2() in Android module.

Stephen Hines via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 29 15:11:53 PDT 2019


srhines added inline comments.


================
Comment at: clang-tools-extra/test/clang-tidy/android-cloexec-pipe2.cpp:48
+  pipe2(pipefd, O_NONBLOCK);
+  // CHECK-MESSAGES-NOT: warning:
+  TEMP_FAILURE_RETRY(pipe2(pipefd, O_NONBLOCK));
----------------
Much like line 39 (which covers both lines 37 and 38), you can delete this CHECK-MESSAGES-NOT. The one on line 50 will cover both of these.


================
Comment at: clang-tools-extra/test/clang-tidy/android-cloexec-pipe2.cpp:64
+  TEMP_FAILURE_RETRY(pipe2(pipefd, O_NONBLOCK | O_CLOEXEC));
+  // CHECK-MESSAGES-NOT: warning:
+}
----------------
Only keep this CHECK-MESSAGES-NOT line.


================
Comment at: clang-tools-extra/test/clang-tidy/android-cloexec-pipe2.cpp:75
+    TEMP_FAILURE_RETRY(pipe2(pipefd, O_NONBLOCK));
+    // CHECK-MESSAGES-NOT: warning:
+  }
----------------
Only keep this CHECK-MESSAGES-NOT line.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62049





More information about the cfe-commits mailing list