HomePhabricator

[clang-tidy] New option for misc-throw-by-value-catch-by-reference

Description

[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

Details

Committed
baloghadamsoftwareMay 21 2019, 12:25 AM
Differential Revision
D61851: [clang-tidy] New option for misc-throw-by-value-catch-by-reference
Branches
Unknown
Tags
Unknown