This is an archive of the discontinued LLVM Phabricator instance.

[libc] Check signs instead of values in memcmp unittests.
ClosedPublic

Authored by cheng.w on Sep 10 2021, 2:43 AM.

Details

Summary

The C standard only guarantees the sign of return value. The exact return
value is implementation defined.

Diff Detail

Event Timeline

cheng.w created this revision.Sep 10 2021, 2:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 10 2021, 2:43 AM
cheng.w requested review of this revision.Sep 10 2021, 2:43 AM
gchatelet accepted this revision.Sep 10 2021, 2:50 AM

Using z instead of b or c does not bring much but I don't mind the change.
Thx for the patch.

This revision is now accepted and ready to land.Sep 10 2021, 2:50 AM
This revision was automatically updated to reflect the committed changes.