Page MenuHomePhabricator

[clang-tidy] Add a close-on-exec check on dup() in Android module.
ClosedPublic

Authored by yawanng on Jul 13 2017, 10:36 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

yawanng created this revision.Jul 13 2017, 10:36 AM
yawanng edited the summary of this revision. (Show Details)Jul 13 2017, 10:55 AM
yawanng edited the summary of this revision. (Show Details)Jul 13 2017, 11:01 AM
Eugene.Zelenko edited reviewers, added: alexfh, hokein, aaron.ballman; removed: chh.Jul 13 2017, 11:15 AM
Eugene.Zelenko set the repository for this revision to rL LLVM.
Eugene.Zelenko added a subscriber: cfe-commits.
chh added a subscriber: chh.Jul 13 2017, 11:59 AM
alexfh edited edge metadata.Jul 15 2017, 1:28 AM

See the comment on D35372.

alexfh requested changes to this revision.Jul 15 2017, 1:32 AM
This revision now requires changes to proceed.Jul 15 2017, 1:32 AM
yawanng updated this revision to Diff 110654.Aug 10 2017, 4:56 PM
yawanng edited edge metadata.
hokein added inline comments.Aug 11 2017, 7:13 AM
clang-tidy/android/CloexecCheck.h
91 ↗(On Diff #110654)

This method seems only be used in one check. Maybe move it to the implementation of that specific check? And you can make the private members FuncBindingStr and FuncDeclBindingStr to protected member.

test/clang-tidy/android-cloexec-dup.cpp
7 ↗(On Diff #110654)

nit: trailing ;, the same below. Please apply this to other patches as well.

yawanng updated this revision to Diff 110753.Aug 11 2017, 10:07 AM
yawanng marked an inline comment as done.
yawanng added inline comments.
clang-tidy/android/CloexecCheck.h
91 ↗(On Diff #110654)

Actually, this method will be used in three checks.

hokein accepted this revision.Aug 14 2017, 1:25 AM

LGTM

clang-tidy/android/CloexecCheck.h
91 ↗(On Diff #110654)

Ah, ok. Sorry for missing it.

This revision was automatically updated to reflect the committed changes.