This is an archive of the discontinued LLVM Phabricator instance.

[ClangTidy - performance-unnecessary-value-param]: Do not issue fix for functions that are referenced outside of callExpr
ClosedPublic

Authored by flx on Nov 1 2016, 9:59 AM.

Details

Summary

Suppress fixes for functions that are referenced within the compilation unit outside of a call expression as the signature change could break the code referencing the function.

We still issue a warning in this case so that users can decide to manually change the function signature.

Diff Detail

Repository
rL LLVM

Event Timeline

flx updated this revision to Diff 76586.Nov 1 2016, 9:59 AM
flx retitled this revision from to [ClangTidy - performance-unnecessary-value-param]: Do not issue fix for functions that are referenced outside of callExpr.
flx updated this object.
flx added reviewers: alexfh, sbenza.
flx set the repository for this revision to rL LLVM.
flx added a subscriber: cfe-commits.
aaron.ballman accepted this revision.Nov 7 2016, 1:48 PM
aaron.ballman edited edge metadata.

Aside from a commenting nit, LGTM.

clang-tidy/performance/UnnecessaryValueParamCheck.cpp
130 ↗(On Diff #76586)

Not grammatically correct; should be "1. when the ParmVarDecl is in a macro, since..."

This revision is now accepted and ready to land.Nov 7 2016, 1:48 PM
flx updated this revision to Diff 77343.Nov 9 2016, 6:42 AM
flx edited edge metadata.
flx removed rL LLVM as the repository for this revision.
flx marked an inline comment as done.

Thanks for the review!

This revision was automatically updated to reflect the committed changes.