[PATCH] D11328: [clang-tidy] new "throw-by-value-catch-by-reference" check for clang-tidy

Tobias Langner via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 9 12:49:17 PDT 2015


randomcppprogrammer updated this revision to Diff 36977.
randomcppprogrammer marked 7 inline comments as done.
randomcppprogrammer added a comment.

new:

- diagnosis on throwing lvalues returned by function calls such as

struct S;
S& function();

void foo() {

  throw function();

}

- updated tests for this case
- updated some comments


http://reviews.llvm.org/D11328

Files:
  clang-tidy/misc/CMakeLists.txt
  clang-tidy/misc/MiscTidyModule.cpp
  clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
  clang-tidy/misc/ThrowByValueCatchByReferenceCheck.h
  test/clang-tidy/misc-throw-by-value-catch-by-reference.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11328.36977.patch
Type: text/x-patch
Size: 15537 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151009/a657f270/attachment-0001.bin>


More information about the cfe-commits mailing list