summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] new performance-no-automatic-move check.Clement Courbet2019-11-221-0/+3
| | | | | | | | | | | | Summary: The check flags constructs that prevent automatic move of local variables. Reviewers: aaron.ballman Subscribers: mgorny, xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70390
* [clang-tidy] New checker performance-trivially-destructible-checkAnton Bikineev2019-11-011-0/+3
| | | | | | | | | | | | | Checks for types which can be made trivially-destructible by removing out-of-line defaulted destructor declarations. The check is motivated by the work on C++ garbage collector in Blink (rendering engine for Chrome), which strives to minimize destructors and improve runtime of sweeping phase. In the entire chromium codebase the check hits over 2000 times. Differential Revision: https://reviews.llvm.org/D69435
* Fix file headers. NFCFangrui Song2019-03-011-1/+1
| | | | llvm-svn: 355188
* 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
* [clang-tidy] Move more checks from misc- to performance-Alexander Kornienko2017-11-281-0/+6
| | | | | | | | | | | | | | | | 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] Move checks from misc- to performance-Alexander Kornienko2017-11-271-0/+6
| | | | | | | | | | | | | | | | Summary: rename_check.py misc-move-constructor-init performance-move-constructor-init rename_check.py misc-inefficient-algorithm performance-inefficient-algorithm Reviewers: hokein, aaron.ballman Reviewed By: hokein, aaron.ballman Subscribers: aaron.ballman, mgorny, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D40487 llvm-svn: 319023
* [clang-tidy] 'implicit cast' -> 'implicit conversion'Alexander Kornienko2017-08-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch renames checks, check options and changes messages to use correct term "implicit conversion" instead of "implicit cast" (which has been in use in Clang AST since ~10 years, but it's still technically incorrect w.r.t. C++ standard). * performance-implicit-cast-in-loop -> performance-implicit-conversion-in-loop * readability-implicit-bool-cast -> readability-implicit-bool-conversion - readability-implicit-bool-cast.AllowConditionalIntegerCasts -> readability-implicit-bool-conversion.AllowIntegerConditions - readability-implicit-bool-cast.AllowConditionalPointerCasts -> readability-implicit-bool-conversion.AllowPointerConditions Reviewers: hokein, jdennett Reviewed By: hokein Subscribers: mgorny, JDevlieghere, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D36456 llvm-svn: 310366
* [clang-tidy] Add a clang-tidy check for possible inefficient vector operationsHaojian Wu2017-04-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The "performance-inefficient-vector-operation" check finds vector oprations in for-loop statements which may cause multiple memory reallocations. This is the first version, only detects typical for-loop: ``` std::vector<int> v; for (int i = 0; i < n; ++i) { v.push_back(i); } // or for (int i = 0; i < v2.size(); ++i) { v.push_back(v2[i]); } ``` We can extend it to handle more cases like for-range loop in the future. Reviewers: alexfh, aaron.ballman Reviewed By: aaron.ballman Subscribers: zaks.anna, Eugene.Zelenko, mgorny, cfe-commits, djasper Differential Revision: https://reviews.llvm.org/D31757 llvm-svn: 300534
* [ClangTidy] Add new performance-type-promotion-in-math-fn check.Justin Lebar2016-12-141-2/+4
| | | | | | | | | | | | | Summary: This checks for calls to double-precision math.h with single-precision arguments. For example, it suggests replacing ::sin(0.f) with ::sinf(0.f). Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D27284 llvm-svn: 289627
* [clang-tidy] Inefficient string operationAlexander Kornienko2016-08-031-0/+3
| | | | | | | | Patch by Bittner Barni! Differential revision: https://reviews.llvm.org/D20196 llvm-svn: 277677
* [clang-tidy] Add performance check to flag function parameters of expensive ↵Felix Berger2016-03-291-0/+3
| | | | | | | | | | | | to copy types that can be safely converted to const references. Reviewers: alexfh Subscribers: fowles, cfe-commits Differential Revision: http://reviews.llvm.org/D17491 llvm-svn: 264694
* [clang-tidy] Add check performance-faster-string-findSamuel Benzaquen2016-02-121-0/+3
| | | | | | | | | | | | | | Summary: Add check performance-faster-string-find. It replaces single character string literals to character literals in calls to string::find and friends. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16152 llvm-svn: 260712
* [clang-tidy] ForRangeCopyCheck that warns on and fixes unnecessary copies of ↵Alexander Kornienko2016-01-291-0/+3
| | | | | | | | | | loop variables. Patch by Felix Berger! Differential revision: http://reviews.llvm.org/D13849 llvm-svn: 259199
* [clang-tidy] Move implicit-cast-in-loop check to upstream.Alexander Kornienko2016-01-291-0/+3
| | | | | | | | | | | | | | Summary: This is implemented originally by Alex Pilkiewicz (pilki@google.com). Reviewers: alexfh Subscribers: cfe-commits Patch by Haojian Wu! Differential Revision: http://reviews.llvm.org/D16721 llvm-svn: 259195
* [clang-tidy] Add UnnecessaryCopyInitialization check to new "performance" ↵Alexander Kornienko2015-12-301-0/+39
module in ClangTidy Summary: The patch adds a new ClangTidy check that detects when expensive-to-copy types are unnecessarily copy initialized from a const reference that has the same or are larger scope than the copy. It currently only detects this when the copied variable is const qualified. But this will be extended to non const variables if they are only used in a const fashion. Reviewers: alexfh Subscribers: cfe-commits Patch by Felix Berger! Differential Revision: http://reviews.llvm.org/D15623 llvm-svn: 256632
OpenPOWER on IntegriCloud