[clang-tidy] New option for misc-throw-by-value-catch-by-reference
Catching trivial objects by value is not dangerous but may be inefficient if they are too large. This patch adds an option `WarnOnLargeObject` to the checker to also warn if such an object is caught by value. An object is considered as "large" if its size is greater than `MaxSize` which is another option. Default value is the machine word of the architecture (size of the type `size_t`). Differential Revision: https://reviews.llvm.org/D61851 llvm-svn: 361225
Loading
Please register or sign in to comment