Warning, /sdk/clazy/docs/checks/README-function-args-by-ref.md is written in an unsupported language. File is not indexed.

0001 # function-args-by-ref
0002 
0003 Warns when you should be passing by const-ref.
0004 Types with sizeof > 16 bytes [1] or types which are not trivially-copyable [2] or not trivially-destructible [3] should be passed by ref. A rule of thumb is that if passing by value would trigger copy-ctor and/or dtor then pass by ref instead.
0005 
0006 This check will ignore shared pointers, you're on your own. Most of the times passing shared pointers by const-ref is the best thing to do, but occasionally that will lead to crashes if you're in a method that calls something else that makes the shared pointer ref count go down to zero.
0007 
0008 
0009 #### Fixits
0010 
0011 This check supports adding missing `&` or `const-&`. See the README.md on how to enable it.
0012 
0013 
0014 - [1] <http://www.macieira.org/blog/2012/02/the-value-of-passing-by-value/>
0015 - [2] <https://en.cppreference.com/w/cpp/named_req/TriviallyCopyable>
0016 - [3] <http://www.cplusplus.com/reference/type_traits/is_trivially_destructible/>