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

Torbjörn Klatt via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 13 10:59:49 PDT 2019


torbjoernk added inline comments.


================
Comment at: docs/clang-tidy/checks/misc-throw-by-value-catch-by-reference.rst:35-46
+.. option:: WarnOnLargeObject
+
+   Also warns for any large trivial object caught by value. Catching a large
+   object by value is not dangerous but affects the perofrmance negatively. The
+   maximum size of an object allowed to be caught without warning can be set
+   using option `MaxSize`
+   Default is `0`.
----------------
I think it might be worth adding a note on the fallback to `sizeof(size_t)` if `MaxSize` is not set or manually set to `std::numeric_limits<uint64_t>::max()` by the user.


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61851/new/

https://reviews.llvm.org/D61851





More information about the cfe-commits mailing list