[PATCH] D45059: [clang-tidy] Add check to catch comparisons in TEMP_FAILURE_RETRY

George Burgess IV via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 30 14:30:17 PDT 2018


george.burgess.iv added a comment.

> C89 has no bool type and no stdbool.h but it has been added to later standards? That means the generalization could theoretically be done for later C standards, because we could check if the bool typedef had been used? If yes, would the check benefit?

Sure, and we do complain about `x == -1` if the type of `x` is `_Bool`, but the type of `x == y` appears to be an `int` in all of {c89, c99, c11}: https://godbolt.org/g/BciGZT :)


https://reviews.llvm.org/D45059





More information about the cfe-commits mailing list