[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-12 Thread Yan Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307818: [clang-tidy] Add a new Android check "android-cloexec-socket" (authored by yawanng). Changed prior to commit: https://reviews.llvm.org/D34913?vs=106058&id=106252#toc Repository: rL LLVM http

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D34913#806799, @yawanng wrote: > In https://reviews.llvm.org/D34913#797577, @Eugene.Zelenko wrote: > > > Please wait for Alexander, Aaron or Haojian approval. > > > Could you please check this CL? Thank you. You could commit changes, s

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-12 Thread Yan Wang via Phabricator via cfe-commits
yawanng added a comment. In https://reviews.llvm.org/D34913#797577, @Eugene.Zelenko wrote: > Please wait for Alexander, Aaron or Haojian approval. Could you please check this CL? Thank you. https://reviews.llvm.org/D34913 ___ cfe-commits mailing

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. LG https://reviews.llvm.org/D34913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-11 Thread Yan Wang via Phabricator via cfe-commits
yawanng updated this revision to Diff 106058. yawanng marked 4 inline comments as done. https://reviews.llvm.org/D34913 Files: clang-tidy/android/AndroidTidyModule.cpp clang-tidy/android/CMakeLists.txt clang-tidy/android/CloexecOpenCheck.cpp clang-tidy/android/CloexecSocketCheck.cpp cla

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-11 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/utils/ASTUtils.h:24 + +/// Check whether a macro flag is present in the given argument. Only consider +/// cases of single match or match

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-10 Thread Yan Wang via Phabricator via cfe-commits
yawanng added inline comments. Comment at: clang-tidy/utils/ASTUtils.h:27 +/// or | | ... +bool hasFlag(const Expr *Flags, const SourceManager &SM, + const LangOptions &LangOpts, const char *CloseOnExecFlag); alexfh wrote: > `hasFlag` is too generi

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-10 Thread Yan Wang via Phabricator via cfe-commits
yawanng updated this revision to Diff 105878. yawanng marked 5 inline comments as done. https://reviews.llvm.org/D34913 Files: clang-tidy/android/AndroidTidyModule.cpp clang-tidy/android/CMakeLists.txt clang-tidy/android/CloexecOpenCheck.cpp clang-tidy/android/CloexecSocketCheck.cpp cla

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-10 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/utils/ASTUtils.h:24 + +/// Check whether a macro flag presents in the given argument. Only consider +/// cases of single match or match i

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-05 Thread Yan Wang via Phabricator via cfe-commits
yawanng updated this revision to Diff 105293. yawanng marked 8 inline comments as done. https://reviews.llvm.org/D34913 Files: clang-tidy/android/AndroidTidyModule.cpp clang-tidy/android/CMakeLists.txt clang-tidy/android/CloexecOpenCheck.cpp clang-tidy/android/CloexecSocketCheck.cpp cla

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. Comment at: test/clang-tidy/android-cloexec-socket.cpp:20 + // CHECK-MESSAGES: :[[@LINE-1]]:24: warning: 'socket' should use SOCK_CLOEXEC where possible [android-cloexec-socket] + // CHECK-FIXES: SOCK_STR

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tidy/utils/CloexecFlagChecker.h:21 +/// specific macro flag in a given argument. +bool hasCloseOnExecFlag(const Expr *Flags, const SourceManager &SM, +const LangOptions &LangOpts, Maybe put t

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-06-30 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko requested changes to this revision. Eugene.Zelenko added a comment. This revision now requires changes to proceed. Please wait for Alexander, Aaron or Haojian approval. Comment at: clang-tidy/android/CloexecOpenCheck.cpp:22 namespace { static constexpr const

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-06-30 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh accepted this revision. chh added a comment. This revision is now accepted and ready to land. LGTM. If nobody needs this during the long weekend, it's better to submit after the long weekend. Repository: rL LLVM https://reviews.llvm.org/D34913 _

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-06-30 Thread Yan Wang via Phabricator via cfe-commits
yawanng created this revision. yawanng added a project: clang-tools-extra. Herald added subscribers: xazax.hun, JDevlieghere, mgorny, srhines. socket() is better to include SOCK_CLOEXEC in its type argument to avoid the file descriptor leakage. Repository: rL LLVM https://reviews.llvm.org/D3