[PATCH] D41740: [clang-tidy] Adding a new bugprone check for streaming objects of type int8_t or uint8_t
Arthur O'Dwyer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 4 14:54:27 PST 2018
Quuxplusone added inline comments.
================
Comment at: clang-tidy/bugprone/StreamInt8Check.cpp:44
+ } else if (Name == "int8_t") {
+ diag(Offender->getLocStart(), "streaming int8_t");
+ break;
----------------
I don't know clang-tidy style either, but might it be more appropriate to say something like "value of type int8_t will be printed as character, not number"? I had to go all the way down to the test cases in this patch before it occurred to me what the actual problem being diagnosed here was.
And speaking of "printed": do you care about streaming *in* values of these types with ">>"?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D41740
More information about the cfe-commits
mailing list