summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove \brief commands from doxygen comments.Dmitri Gribenko2019-08-221-6/+6
| | | | | | | | | | | | | | | | | | | | | | | Summary: We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done [This is analogous to LLVM r331272 and CFE r331834] Subscribers: srhines, nemanjai, javed.absar, kbarton, MaskRay, jkorous, arphaman, jfb, kadircet, jsji, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66578 llvm-svn: 369643
* [clang-tools-extra] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-141-1/+1
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368944
* [clang-tidy] Move all checks to the new registerPPCallbacks APIAlexander Kornienko2019-03-221-4/+6
| | | | llvm-svn: 356796
* 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 getLocEnd -> getEndLocStephen Kelly2018-08-091-1/+1
| | | | | | | | Subscribers: nemanjai, ioeric, kbarton, cfe-commits Differential Revision: https://reviews.llvm.org/D50355 llvm-svn: 339401
* Port getLocStart -> getBeginLocStephen Kelly2018-08-091-2/+2
| | | | | | | | | | Reviewers: javed.absar Subscribers: nemanjai, kbarton, ilya-biryukov, ioeric, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D50354 llvm-svn: 339400
* [tidy] Move private ast matchers into anonymous namespaces to avoid ODR ↵Benjamin Kramer2018-02-181-0/+2
| | | | | | | | conflicts. No functionality change intended. llvm-svn: 325467
* [clang-tidy] Move more checks from misc- to performance-Alexander Kornienko2017-11-281-1/+1
| | | | | | | | | | | | | | | | Summary: rename_check.py misc-move-const-arg performance-move-const-arg rename_check.py misc-noexcept-move-constructor performance-noexcept-move-constructor Reviewers: hokein, xazax.hun Reviewed By: xazax.hun Subscribers: rnkovacs, klimek, mgorny, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D40507 llvm-svn: 319183
* [clang-tidy] Unify the way IncludeStyle and HeaderFileExtesions options are usedAlexander Kornienko2017-07-201-1/+1
| | | | llvm-svn: 308605
* [clang-tidy] Fix check for trivially copyable types in modernize-pass-by-valueMalcolm Parsons2017-01-121-1/+2
| | | | | | | | | | | | | | | Summary: rL270567 excluded trivially copyable types from being moved by modernize-pass-by-value, but it didn't exclude references to them. Change types used in the tests to not be trivially copyable. Reviewers: madsravn, aaron.ballman, alexfh Subscribers: JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D28614 llvm-svn: 291796
* [clang-tidy] Remove duplicated check from move-constructor-initMalcolm Parsons2016-12-171-3/+8
| | | | | | | | | | | | | | | | | | | | Summary: An addition to the move-constructor-init check was duplicating the modernize-pass-by-value check. Remove the additional check and UseCERTSemantics option. Run the move-constructor-init test with both checks enabled. Fix modernize-pass-by-value false-positive when initializing a base class. Add option to modernize-pass-by-value to only warn about parameters that are already values. Reviewers: alexfh, flx, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26453 llvm-svn: 290051
* [clang-tidy] Cleaning up language options.Gabor Horvath2016-09-241-5/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D24881 llvm-svn: 282319
* [clang-tidy] remove trailing whitespaces and retabKirill Bobyrev2016-08-011-1/+1
| | | | llvm-svn: 277340
* [ASTMatchers] Added ignoringParenImpCasts to has matchersPiotr Padlewski2016-05-311-2/+2
| | | | | | | | | has matcher changed behaviour, and now it matches "as is" and doesn't skip implicit and paren casts http://reviews.llvm.org/D20801 llvm-svn: 271289
* [clang-tidy] modernize-pass-by-value bugfixMads Ravn2016-05-241-0/+5
| | | | | | | | | | | | Modified the clang-tidy PassByValue check. It now stops adding std::move to type which is trivially copyable because that caused the clang-tidy MoveConstArg to complain and revert, thus creating a cycle. I have also added a lit-style test to verify the bugfix. This is the bug on bugzilla: https://llvm.org/bugs/show_bug.cgi?id=27731 This is the code review on phabricator: http://reviews.llvm.org/D20365 llvm-svn: 270565
* Commiting for http://reviews.llvm.org/D20365Mads Ravn2016-05-231-6/+0
| | | | llvm-svn: 270473
* Commiting for http://reviews.llvm.org/D20365Mads Ravn2016-05-231-0/+6
| | | | llvm-svn: 270472
* [clang-tidy] Cleanup namespace in utils folder.Etienne Bergeron2016-05-031-4/+5
| | | | | | | | | | | | | | Summary: This is a step forward cleaning up the namespaces in clang-tidy/utils. There is no behavior change. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19819 llvm-svn: 268356
* small reformat to test accessPiotr Padlewski2016-04-291-27/+27
| | | | llvm-svn: 268076
* [clang-tidy] Make 'modernize-pass-by-value' fix work on header files.Haojian Wu2016-03-021-5/+6
| | | | | | | | | | Reviewers: alexfh Subscribers: jbcoe, cfe-commits Differential Revision: http://reviews.llvm.org/D17756 llvm-svn: 262470
* Improved the misc-move-constructor-init check to identify arguments that are ↵Aaron Ballman2015-10-061-4/+3
| | | | | | | | passed by value but copy assigned to class data members when the non-deleted move constructor is a better fit. Patch by Felix Berger! llvm-svn: 249429
* Refactors AST matching code to use the new AST matcher names. This patch ↵Aaron Ballman2015-09-171-5/+5
| | | | | | correlates to r247885 which performs the AST matcher rename in Clang. llvm-svn: 247886
* Disable several more clang-tidy modernize checkers when not compiling in C++ ↵Aaron Ballman2015-08-281-26/+37
| | | | | | mode. Loop conversion would make recommendations for C code, so added a test to ensure that does not happen. The pass by value, use auto and replace auto_ptr checkers would not make recommendations for C code, and are disabled for performance reasons, but do not require an extra test. llvm-svn: 246310
* Replacing a custom AST matcher with some builtin AST matchers; NFC, and ↵Aaron Ballman2015-08-191-14/+1
| | | | | | existing tests should provide sufficient coverage. llvm-svn: 245492
* [clang-tidy] Create clang-tidy module modernize. Add pass-by-value check.Alexander Kornienko2015-08-141-0/+223
This is the first step for migrating cppmodernize to clang-tidy. http://reviews.llvm.org/D11946 Patch by Angel Garcia! llvm-svn: 245045
OpenPOWER on IntegriCloud