This is an archive of the discontinued LLVM Phabricator instance.

[libc] Fix compilation issues in memory_check_utils.h
ClosedPublic

Authored by mcgrathr on May 25 2023, 1:59 PM.

Details

Summary

Strict warnings require explicit static_cast to counteract
default widening of types narrower than int.

Functions in header files should have vague linkage (inline
keyword), not internal linkage (static) or external linkage
(no inline keyword) even for template functions. Note these
don't use the LIBC_INLINE macro since this is only for test code.

Diff Detail

Event Timeline

mcgrathr created this revision.May 25 2023, 1:59 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 25 2023, 1:59 PM
mcgrathr requested review of this revision.May 25 2023, 1:59 PM
abrachet accepted this revision.May 25 2023, 2:05 PM
This revision is now accepted and ready to land.May 25 2023, 2:05 PM
This revision was automatically updated to reflect the committed changes.