This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Improve "common type" diagnostic output in 'bugprone-easily-swappable-parameters'
ClosedPublic

Authored by whisperity on Jul 21 2021, 7:13 AM.

Details

Summary

Make the check handle cases of the "common type" involved in the mix being non-trivial, e.g. pointers, references, attributes, these things coming from typedefs, etc. This results in clearer diagnostics that have more coverage in their explanation, such as saying const int & as common type instead of just int.

Diff Detail