This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] More strict on matching the standard memset function in memset-usage check.
ClosedPublic

Authored by hokein on Jul 7 2020, 6:46 AM.

Details

Summary

The check assumed the matched function call has 3 arguments, but the matcher didn't guaranteed that.

Diff Detail

Event Timeline

hokein created this revision.Jul 7 2020, 6:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 7 2020, 6:46 AM
Herald added a subscriber: xazax.hun. · View Herald Transcript

If you want to be super explicit. Why not add parameterCountIs(3)?

hokein updated this revision to Diff 276405.Jul 8 2020, 6:28 AM

add parameterCountIs(3).

hokein added a comment.Jul 8 2020, 6:28 AM

If you want to be super explicit. Why not add parameterCountIs(3)?

good idea.

hokein edited the summary of this revision. (Show Details)Jul 9 2020, 6:19 AM
hokein added a reviewer: ymandel.
ymandel accepted this revision.Jul 9 2020, 7:40 AM
This revision is now accepted and ready to land.Jul 9 2020, 7:40 AM
gribozavr2 accepted this revision.Jul 9 2020, 8:06 AM

thanks for the review.

This revision was automatically updated to reflect the committed changes.