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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 13 12:42:47 PDT 2019


aaron.ballman added inline comments.


================
Comment at: clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp:25
+      WarnOnLargeObject(Options.get("WarnOnLargeObject", false)),
+      // Cannot access `ASTContext` from here so set it to an extremal value
+      MaxSize(Options.get("MaxSize", std::numeric_limits<uint64_t>::max())) {}
----------------
Missing a full stop at the end of the comment.


================
Comment at: docs/clang-tidy/checks/misc-throw-by-value-catch-by-reference.rst:37-40
+   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`
----------------
large trivial object -> large, trivial object
affects the perofrmance -> affects the performance
using option `MaxSize` -> using the `MaxSize` option.


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