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
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
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
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
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
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
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
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