Page MenuHomePhabricator

[PR36008] Avoid -Wsign-compare warning for enum constants in typeof expressions

Authored by arphaman on Jan 25 2018, 4:32 PM.

Diff Detail


Event Timeline

arphaman created this revision.Jan 25 2018, 4:32 PM
lebedev.ri edited the summary of this revision. (Show Details)Jan 26 2018, 2:33 AM
lebedev.ri added a project: Restricted Project.
lebedev.ri added inline comments.
8959 ↗(On Diff #131522)

Please also add a comment what this is trying to solve.

404 ↗(On Diff #131522)

Can you also add the swapped test:

if (y == x) x = y; // no warning
aaron.ballman added inline comments.Jan 26 2018, 8:02 AM
8959 ↗(On Diff #131522)

const auto *

398 ↗(On Diff #131522)

Formatting looks off here.

arphaman updated this revision to Diff 132901.Feb 5 2018, 3:58 PM
arphaman marked 4 inline comments as done.

Address review comments and fix the inverted check case.

aaron.ballman accepted this revision.Feb 6 2018, 4:49 AM

LGTM, aside from a minor commenting nit.

8960 ↗(On Diff #132901)

to the sign -> from the sign

This revision is now accepted and ready to land.Feb 6 2018, 4:49 AM
arphaman marked an inline comment as done.Feb 7 2018, 12:47 PM
This revision was automatically updated to reflect the committed changes.