The goal of the patch is to suggest C++ headers rather than their C counterparts. However, for fixed width integer types, the patched IWYU currently suggests <cinttypes> where <cstdint> is sufficient.
This PR fixes this behavior.
The goal of the patch is to suggest C++ headers rather than their C
counterparts. However, for fixed width integer types, the patched IWYU
currently suggests `<cinttypes>` where `<cstdint>` is sufficient.
This change fixes this behavior.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline for information on the review process.
| Type | Reviewers |
|---|---|
| ACK | maflcko, furszy, willcl-ark |
If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
So far, a suboptimal IWYU suggestion was applied in only one place: https://github.com/bitcoin/bitcoin/blob/3532e242134e8f92fb5fe99bbd024ed185839e8c/src/test/fuzz/util/descriptor.h#L9
I plan to fix this, along with the rest of the src/test/fuzz/util directory, after landing #34448.
lgtm ACK b65a3d80093b992a2574d5762a8cd03ce2eb4412
utACK b65a3d80093b992a2574d5762a8cd03ce2eb4412
Are we sending this upstream, or going to start maintaining a divergence in behaviour (assuming other similar changes happen)?
Are we sending this upstream, or going to start maintaining a divergence in behaviour (assuming other similar changes happen)?
The issue is specific to us only as it was introduced by our patch.
utACK b65a3d80093b992a2574d5762a8cd03ce2eb4412
Marking <cstdint> as kPublic means IWYU will suggest it directly rather than redirecting to <cinttypes>, which is what we want here.