[clang-tidy] Add 'bugprone-easily-swappable-parameters' check

Authored by whisperity on Oct 29 2019, 5:52 AM.


[clang-tidy] Add 'bugprone-easily-swappable-parameters' check

Finds function definitions where parameters of convertible types follow
each other directly, making call sites prone to calling the function
with swapped (or badly ordered) arguments.

Such constructs are usually the result of inefficient design and lack of
exploitation of strong type capabilities that are possible in the

This check finds and flags function definitions and not call

Reviewed By: aaron.ballman, alexfh

Differential Revision: http://reviews.llvm.org/D69560