In the handleIntToFloatConversion() function, 6th parameter is ConvertFloat, 7th parameter is ConvertInt.
Details
Diff Detail
- Repository
- rC Clang
Event Timeline
clang/lib/Sema/SemaExpr.cpp | ||
---|---|---|
1144 | Shouldn’t some clang based tool warn us that the comment is wrong? |
clang/lib/Sema/SemaExpr.cpp | ||
---|---|---|
1144 | I did not check with clang based tool, while debugging other issue, I figured out this typo. |
clang/lib/Sema/SemaExpr.cpp | ||
---|---|---|
1144 | There is one that does just that. https://clang.llvm.org/extra/clang-tidy/checks/bugprone-argument-comment.html |
clang/lib/Sema/SemaExpr.cpp | ||
---|---|---|
1144 | 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); |
I don't have commit access. Could you or someone else commit this patch?
My Github username: gousemoodhin
My GitHub email id: nadafgouse5@gmail.com
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.
Shouldn’t some clang based tool warn us that the comment is wrong?