summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] New option for misc-throw-by-value-catch-by-referenceAdam Balogh2019-05-211-2/+16
| | | | | | | | | | | | | | Catching trivial objects by value is not dangerous but may be inefficient if they are too large. This patch adds an option `WarnOnLargeObject` to the checker to also warn if such an object is caught by value. An object is considered as "large" if its size is greater than `MaxSize` which is another option. Default value is the machine word of the architecture (size of the type `size_t`). Differential Revision: https://reviews.llvm.org/D61851 llvm-svn: 361225
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Port getLocStart -> getBeginLocStephen Kelly2018-08-091-4/+4
| | | | | | | | | | Reviewers: javed.absar Subscribers: nemanjai, kbarton, ilya-biryukov, ioeric, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D50354 llvm-svn: 339400
* [clang-tidy] Fix diag message for catch-by-valueAlexander Kornienko2017-03-231-4/+6
| | | | | | | | | | | | | | | | | | | | | | | Summary: ``` catch (std::exception ex) { } ``` Was flagged with "catch handler catches a pointer value". Reviewers: alexfh, aaron.ballman Reviewed By: aaron.ballman Subscribers: cfe-commits, JDevlieghere Patch by Florian Gross! Differential Revision: https://reviews.llvm.org/D30592 llvm-svn: 298608
* modernize-use-auto NFC fixesPiotr Padlewski2016-12-141-4/+2
| | | | llvm-svn: 289656
* [clang-tools-extra] Format sources with clang-format. NFC.Mandeep Singh Grang2016-11-081-1/+1
| | | | | | | | | | | | | | | | Summary: Ran clang-format on all .c/.cpp/.h files in clang-tools-extra. Excluded the test, unittests, clang-reorder-fields, include-fixer, modularize and pptrace directories. Reviewers: klimek, alexfh Subscribers: nemanjai Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D26329 llvm-svn: 286221
* [clang-tidy] remove trailing whitespaces and retabKirill Bobyrev2016-08-011-1/+1
| | | | llvm-svn: 277340
* [clang-tidy] Cleaning namespaces to be more consistant across checkers.Etienne Bergeron2016-05-021-0/+2
| | | | | | | | | | | | | | Summary: The goal of the patch is to bring checkers in their appropriate namespace. This path doesn't change any behavior. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19811 llvm-svn: 268264
* Add a new checker that tests whether a throw expression throws by value, and ↵Aaron Ballman2015-10-091-0/+159
whether a catch statement catches by reference. Patch by Tobias Langner! llvm-svn: 249899
OpenPOWER on IntegriCloud