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

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 16 08:29:18 PDT 2017


alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.

LG with a nit.



================
Comment at: clang-tidy/android/CloexecAcceptCheck.cpp:42
+      "prefer accept4() to accept() because accept4() allows SOCK_CLOEXEC",
+      /*FixMsg=*/ReplacementText);
+}
----------------
Two minor issues here:
1. `FixMsg` name is misleading, specifically the "Msg" part, since it's not a message.
2. there's no need to use an argument comment, where it's clear what the actual argument's meaning is. E.g. `ReplacementText` is pretty clear on its own. As is the warning message above.


https://reviews.llvm.org/D35362





More information about the cfe-commits mailing list