[PATCH] D13620: Documentation for "Throw by value, catch by reference" check in clang-tidy

2015-10-09 Thread Tobias Langner via cfe-commits
randomcppprogrammer created this revision. randomcppprogrammer added reviewers: aaron.ballman, cfe-commits. adds documentation for the check mentioned in the title http://reviews.llvm.org/D13620 Files: docs/clang-tidy/checks/misc-throw-by-value-catch-by-reference.rst Index: docs/clang-tidy/ch

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

2015-10-09 Thread Tobias Langner via cfe-commits
randomcppprogrammer updated this revision to Diff 36983. randomcppprogrammer added a comment. fixed formatting http://reviews.llvm.org/D11328 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp clang-tidy/misc/Th

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

2015-10-09 Thread Tobias Langner via cfe-commits
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 te

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

2015-10-09 Thread Tobias Langner via cfe-commits
Hi Aaron, > >> - the second thing is this MaterializeTemporary advice that you gave. I >> don’t fully understand it (possibly due to a lack of understanding the AST >> and a lack of documentation of the proposed methods). Could you please flesh >> out your idea and why you think it is necessar

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

2015-10-07 Thread Tobias Langner via cfe-commits
Hi,I incorporated most of your changes. There are 2 open issues- on one location I could not follow your advice, the compiler refused to compile the code. I chose a different approach and hope you like it.- the second thing is this MaterializeTemporary advice that you gave. I don’t fully understand

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

2015-10-07 Thread Tobias Langner via cfe-commits
randomcppprogrammer updated this revision to Diff 36795. randomcppprogrammer marked 11 inline comments as done. randomcppprogrammer added a comment. Incorporated feedback from Aaron Ballmann main changes: - replaced isa followed by cast with dyn_cast - reworked comments - fixed typo in diagnosis

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

2015-10-06 Thread Tobias Langner via cfe-commits
randomcppprogrammer updated this revision to Diff 36700. randomcppprogrammer marked 17 inline comments as done. randomcppprogrammer added a comment. reworked code to include the changes suggested by Aaron Ballman main changes - will not diagnose on throwing catch variables by value/pointer - wil

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

2015-09-05 Thread Tobias Langner via cfe-commits
randomcppprogrammer added a reviewer: aaron.ballman. randomcppprogrammer updated this revision to Diff 34111. randomcppprogrammer added a comment. Updated check according to comments given by Aaron Ballman. Most notable change: added optional check for throwing anonmyous temporaries. http://rev