This is an archive of the discontinued LLVM Phabricator instance.

[Sema] Move 'char-expression-as-unsigned < 0' into a separate diagnostic
ClosedPublic

Authored by AntonBikineev on Apr 2 2021, 11:37 AM.

Details

Summary

This change splits '-Wtautological-unsigned-zero-compare' by reporting
char-expressions-interpreted-as-unsigned under a separate diagnostic
'-Wtautological-unsigned-char-zero-compare'. This is beneficial for
projects that want to enable '-Wtautological-unsigned-zero-compare' but at
the same time want to keep code portable for platforms with char being
signed or unsigned, such as Chromium.

Diff Detail

Event Timeline

AntonBikineev requested review of this revision.Apr 2 2021, 11:37 AM
AntonBikineev created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 2 2021, 11:37 AM

friendly ping..

Fix formatting

thakis accepted this revision.Apr 13 2021, 3:46 PM

Seems harmless, so lg :)

This revision is now accepted and ready to land.Apr 13 2021, 3:46 PM