Skip to content
Commit 5f3deb9b authored by Adam Balogh's avatar Adam Balogh
Browse files

[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
parent 03c4bf73
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment