Page MenuHomePhabricator

[clang] Fix typo in comment

Authored by gousemoodhin on Aug 7 2020, 4:21 PM.



In the handleIntToFloatConversion() function, 6th parameter is ConvertFloat, 7th parameter is ConvertInt.

Diff Detail

Event Timeline

gousemoodhin requested review of this revision.Aug 7 2020, 4:21 PM
gousemoodhin created this revision.
xbolva00 added a subscriber: xbolva00.
xbolva00 added inline comments.

Shouldn’t some clang based tool warn us that the comment is wrong?

gousemoodhin added inline comments.Aug 7 2020, 5:04 PM

I did not check with clang based tool, while debugging other issue, I figured out this typo.

njames93 added inline comments.Aug 7 2020, 5:40 PM
gousemoodhin added inline comments.Aug 7 2020, 7:08 PM

Yes, clang-tidy tool catches this bug.

clang-tidy SemaExpr.cpp -checks="-*,bugprone-argument-comment"

SemaExpr.cpp:1145:37: warning: argument name 'convertFloat' in comment does not match parameter name 'ConvertInt' [bugprone-argument-comment] /*convertFloat=*/!IsCompAssign);

xbolva00 accepted this revision.Aug 7 2020, 7:09 PM

Ok, thanks!

This revision is now accepted and ready to land.Aug 7 2020, 7:09 PM

Ok, thanks!

I don't have commit access. Could you or someone else commit this patch?
My Github username: gousemoodhin
My GitHub email id:

njames93 accepted this revision.Aug 8 2020, 12:10 AM

LG, pretty trivial fix. Side note running that check over the code base leads to a lot of warnings, however most of false positives, like using abbreviations in the comment or parameter.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2020, 12:04 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript