yawanng marked an inline comment as done. yawanng added inline comments.
================ Comment at: clang-tidy/android/FileDescriptorCheck.cpp:76 + int64_t val = aPInt.getSExtValue(); + if((val & O_CLOEXEC) == 0) + return false; ---------------- srhines wrote: > Using O_CLOEXEC here is potentially a problem, since most of our compiles are > cross-compiles. If O_CLOEXEC is different on the target platform than the > host platform (where this code is being compiled), this check would fail. > Perhaps we can get the value of O_CLOEXEC as defined for the translation unit > (and if it isn't defined, that's already a pretty big indicator that any use > of these functions will be wrong). Alternately, maybe just re-parsing for > "O_CLOEXEC" is better. I also think re-parsing is better. I will think about this and update soon. https://reviews.llvm.org/D33304 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits