This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] fixed misc-unused-parameters omitting parameters default value
ClosedPublic

Authored by PriMee on Sep 7 2017, 6:00 AM.

Details

Summary

Bug: https://bugs.llvm.org/show_bug.cgi?id=34450

Problem:

Clang-tidy check misc-unused-parameters omits parameter default value what results in its complete removal. Compilation errors might occur after clang-tidy fix.

Patch description:

Changed removal range. The range should end after parameter declarator, not after whole parameter declaration (which might contain a default value).

Diff Detail

Repository
rL LLVM

Event Timeline

PriMee created this revision.Sep 7 2017, 6:00 AM
JDevlieghere set the repository for this revision to rL LLVM.Sep 7 2017, 8:04 AM
JDevlieghere added a project: Restricted Project.
alexfh accepted this revision.Sep 8 2017, 7:31 AM

Thank you for the fix!

LG with one nit.

test/clang-tidy/misc-unused-parameters.cpp
73 ↗(On Diff #114165)

Please add an invocation of staticFunctionF without parameters.

This revision is now accepted and ready to land.Sep 8 2017, 7:31 AM
PriMee updated this revision to Diff 114538.Sep 11 2017, 12:32 AM

Done :) Could you please commit this for me?

This revision was automatically updated to reflect the committed changes.

Done :) Could you please commit this for me?

Sure, just committed the patch.