hfinkel added a comment. In https://reviews.llvm.org/D30923#700780, @rnk wrote:
> In https://reviews.llvm.org/D30923#700708, @hfinkel wrote: > > > In https://reviews.llvm.org/D30923#700696, @rnk wrote: > > > > > Do you think it's worth indicating that the error can be suppressed with > > > an explicit cast, or is that wasted space? > > > > > > What might this look like? Also, I don't see a regression test for this. > > > The warning only looks through implicit casts and paren exprs, so it could > look like this: `f.two_bits = (unsigned)three_bits;` I added a test for it. Great, thanks! ================ Comment at: lib/Sema/SemaChecking.cpp:8765 + TypeSourceInfo *TSI = Bitfield->getTypeSourceInfo(); + SourceRange TypeRange = TSI ? TSI->getTypeLoc().getSourceRange() : SourceRange(); + S.Diag(Bitfield->getTypeSpecStartLoc(), diag::note_change_bitfield_sign) ---------------- Line is too long. https://reviews.llvm.org/D30923 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits