Clarify F.16 enforcement rule about passing by value (#2008)

This commit is contained in:
Arkady Shapkin 2022-12-16 01:05:14 +03:00 committed by GitHub
parent fb112c7281
commit ee8d9ab216
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3026,7 +3026,7 @@ If you need the notion of an optional value, use a pointer, `std::optional`, or
* (Simple) ((Foundation)) Warn when a parameter being passed by value has a size greater than `2 * sizeof(void*)`.
Suggest using a reference to `const` instead.
* (Simple) ((Foundation)) Warn when a parameter passed by reference to `const` has a size less than `2 * sizeof(void*)`. Suggest passing by value instead.
* (Simple) ((Foundation)) Warn when a parameter passed by reference to `const` has a size less or equal than `2 * sizeof(void*)`. Suggest passing by value instead.
* (Simple) ((Foundation)) Warn when a parameter passed by reference to `const` is `move`d.
### <a name="Rf-inout"></a>F.17: For "in-out" parameters, pass by reference to non-`const`