This is an archive of the discontinued LLVM Phabricator instance.

PP: Replace some uses of unsigned with size_t
ClosedPublic

Authored by erikjv on Oct 25 2016, 6:34 AM.

Details

Summary

All values are returned by a method as size_t, and subsequently passed
to functions taking a size_t, or used where a size_t is also valid.
Better still, two loops (which had an unsigned), can be replaced by
a range-based for loop.

Diff Detail

Repository
rL LLVM

Event Timeline

erikjv updated this revision to Diff 75696.Oct 25 2016, 6:34 AM
erikjv retitled this revision from to PP: Replace some uses of unsigned with size_t.
erikjv updated this object.
erikjv added a reviewer: bkramer.
erikjv added a subscriber: cfe-commits.
bkramer added inline comments.Oct 25 2016, 6:37 AM
lib/Lex/PPDirectives.cpp
804 ↗(On Diff #75696)

While there you could turn this into a for-range loop

for (IncludeStackInfo &ISEntry : llvm::reverse(IncludeMacroStack))
868 ↗(On Diff #75696)

Looks like another candidate for for-range.

erikjv updated this revision to Diff 75836.Oct 26 2016, 1:38 AM
erikjv updated this object.
bkramer accepted this revision.Oct 26 2016, 1:58 AM
bkramer edited edge metadata.

lg

This revision is now accepted and ready to land.Oct 26 2016, 1:58 AM
This revision was automatically updated to reflect the committed changes.