Page MenuHomePhabricator

Eliminate a magic number. NFC.
ClosedPublic

Authored by mattd on Dec 19 2017, 4:46 PM.

Diff Detail

Repository
rC Clang

Event Timeline

mattd created this revision.Dec 19 2017, 4:46 PM

Please use llvm::array_lengthof to compute the length of an array.

Alternatively, there's an overload of PP.getSpelling which takes a SmallVector and returns a StringRef as a parameter; you could change this code to use it, which would remove the need for the check.

mattd updated this revision to Diff 127641.Dec 19 2017, 5:57 PM

Thanks for the suggestion Eli. Took your initial suggestion.

This revision is now accepted and ready to land.Dec 19 2017, 6:04 PM
mattd added a comment.Dec 19 2017, 6:51 PM

Thanks Eli! I do not have commit permissions, so someone else will have to commit this on my behalf.

mattd added a comment.Jan 2 2018, 1:50 PM

Ping :) I would like someone to commit this on my behalf, thanks!

This revision was automatically updated to reflect the committed changes.