aboutsummaryrefslogtreecommitdiff
path: root/clang-tidy/performance
AgeCommit message (Collapse)Author
2018-11-25A bit of AST matcher cleanup, NFC.Alexander Kornienko
Removed the uses of the allOf() matcher inside node matchers that are implicit allOf(). Replaced uses of allOf() with the explicit node matcher where it makes matchers more readable. Replace anyOf(hasName(), hasName(), ...) with the more efficient and readable hasAnyName(). git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@347520 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-09Ignore implicit things like ConstantExpr.Bill Wendling
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@346461 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-12[clang-tidy] White List Option for performance-unnecessary-value-param, ↵Adam Balogh
performance-unnecessary-copy-initialization and performance-for-range-copy New option added to these three checks to be able to silence false positives on types that are intentionally passed by value or copied. Such types are e.g. intrusive reference counting pointer types like llvm::IntrusiveRefCntPtr. The new option is named WhiteListTypes and can contain a semicolon-separated list of names of these types. Regular expressions are allowed. Default is empty. Differential Revision: https://reviews.llvm.org/D52727 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@344340 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-17[clang-tidy] Remove duplicated logic in UnnecessaryValueParamCheck and use ↵Shuai Wang
FunctionParmMutationAnalyzer instead. Reviewers: alexfh, JonasToth, george.karpenkov Subscribers: xazax.hun, kristof.beyls, chrib, a.sidorin, Szelethus, cfe-commits Differential Revision: https://reviews.llvm.org/D52158 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@342403 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-12[NFC] Fix build breakage due to missing dep caused by D51950Shuai Wang
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@342012 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-11[clangtidy] Remove old copy of ExprMutationAnalyzerShuai Wang
Summary: This is 2/2 of moving ExprMutationAnalyzer from clangtidy to clang/Analysis. ExprMutationAnalyzer is moved to clang/Analysis in D51948. This diff migrates existing usages within clangtidy to point to the new location and remove the old copy of ExprMutationAnalyzer. Reviewers: george.karpenkov, JonasToth Reviewed By: george.karpenkov Subscribers: mgorny, a.sidorin, Szelethus, cfe-commits Differential Revision: https://reviews.llvm.org/D51950 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@342006 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-10[clang-tidy] ExprMutationAnalyzer: construct from references. Fixes PR38888Roman Lebedev
Summary: I have hit this the rough way, while trying to use this in D51870. There is no particular point in storing the pointers, and moreover the pointers are assumed to be non-null, and that assumption is not enforced. If they are null, it won't be able to do anything good with them anyway. Initially i thought about simply adding asserts() that they are not null, but taking/storing references looks like even cleaner solution? Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=38888 | PR38888 ]] Reviewers: JonasToth, shuaiwang, alexfh, george.karpenkov Reviewed By: shuaiwang Subscribers: xazax.hun, a.sidorin, Szelethus, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D51884 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@341854 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-10[clang-tidy] Omit cases where loop variable is not used in loop body inHaojian Wu
performance-for-range-copy check. Summary: The upstream change r336737 make the check too smart to fix the case where loop variable could be used as `const auto&`. But for the case below, changing to `const auto _` will introduce an unused complier warning. ``` for (auto _ : state) { // no references for _. } ``` This patch omit this case, and it is safe to do it as the case is very rare. Reviewers: ilya-biryukov, alexfh Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D50447 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@339415 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-09Port getLocEnd -> getEndLocStephen Kelly
Subscribers: nemanjai, ioeric, kbarton, cfe-commits Differential Revision: https://reviews.llvm.org/D50355 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@339401 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-09Port getLocStart -> getBeginLocStephen Kelly
Reviewers: javed.absar Subscribers: nemanjai, kbarton, ilya-biryukov, ioeric, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D50354 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@339400 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-03Use ExprMutationAnalyzer in performance-unnecessary-value-paramShuai Wang
Summary: This yields better recall as ExprMutationAnalyzer is more accurate. One common pattern this check is now able to catch is: ``` void foo(std::vector<X> v) { for (const auto& elm : v) { // ... } } ``` Reviewers: george.karpenkov Subscribers: a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D50102 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@338903 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-10Use ExprMutationAnalyzer in performance-for-range-copyShuai Wang
Summary: This gives better coverage to the check as ExprMutationAnalyzer is more accurate comparing to isOnlyUsedAsConst. Majority of wins come from const usage of member field, e.g.: for (auto widget : container) { // copy of loop variable if (widget.type == BUTTON) { // const usage only recognized by ExprMutationAnalyzer // ... } } Reviewers: george.karpenkov Subscribers: a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D48854 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@336737 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-11Add support for arrays in performance-implicit-conversion-in-loopAlexander Kornienko
Summary: Add support for arrays (and structure that use naked pointers for their iterator, like std::array) in performance-implicit-conversion-in-loop Reviewers: alexfh Reviewed By: alexfh Subscribers: cfe-commits Patch by Alex Pilkiewicz. Differential Revision: https://reviews.llvm.org/D47945 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@334400 91177308-0d34-0410-b5e6-96231b3b80d8
2018-05-03Update to match clang r331428.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@331429 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-02[clang-tidy] ObjC ARC objects should not trigger ↵Ben Hamilton
performance-unnecessary-value-param Summary: The following Objective-C code currently incorrectly triggers clang-tidy's performance-unnecessary-value-param check: ``` % cat /tmp/performance-unnecessary-value-param-arc.m void foo(id object) { } clang-tidy /tmp/performance-unnecessary-value-param-arc.m -checks=-\*,performance-unnecessary-value-param -- -xobjective-c -fobjc-abi-version=2 -fobjc-arc 1 warning generated. /src/llvm/tools/clang/tools/extra/test/clang-tidy/performance-unnecessary-value-param-arc.m:10:13: warning: the parameter 'object' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param] void foo(id object) { } ~~ ^ const & ``` This is wrong for a few reasons: 1) Objective-C doesn't have references, so `const &` is not going to help 2) ARC heavily optimizes the "expensive" copy which triggers the warning This fixes the issue by disabling the warning for non-C++, as well as disabling it for objects under ARC memory management for Objective-C++. Fixes https://bugs.llvm.org/show_bug.cgi?id=32075 Test Plan: New tests added. Ran tests with `make -j12 check-clang-tools`. Reviewers: alexfh, hokein Reviewed By: hokein Subscribers: stephanemoore, klimek, xazax.hun, cfe-commits, Wizard Differential Revision: https://reviews.llvm.org/D42812 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@324097 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-28[clang-tidy] Move more checks from misc- to performance-Alexander Kornienko
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 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@319183 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27[clang-tidy] Move checks from misc- to performance-Alexander Kornienko
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 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@319023 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-08[clang-tidy] 'implicit cast' -> 'implicit conversion'Alexander Kornienko
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 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@310366 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-02Adapt clang-tidy checks to changing semantics of hasDeclaration.Manuel Klimek
Differential Revision: https://reviews.llvm.org/D36154 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@309810 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-26[clang-tidy] Do not issue fixit for explicit template specializationsFelix Berger
Summary: Do not issue fixit in UnnecessaryValueParamCheck if the function is an explicit template specialization as this could cause build breakages. Reviewers: alexfh Subscribers: JDevlieghere, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D35718 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@309067 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-20[clang-tidy] Unify the way IncludeStyle and HeaderFileExtesions options are usedAlexander Kornienko
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@308605 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-29[clang-tidy] Use getLocalOrGlobal for the StrictMode optionAlexander Kornienko
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@304154 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-16[clang-tidy] Speed up performance-unnecessary-value-param checkAlexander Kornienko
Moved slower matchers closer to the end. The total speed up on a large file I was interested in is not huge, just about 10%, since the check seems to be doing a lot in the check() method. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@303191 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-16[clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.Haojian Wu
Reviewers: alexfh, aaron.ballman Reviewed By: alexfh Subscribers: cfe-commits, Prazek, malcolm.parsons, xazax.hun Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D33209 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@303157 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-15[clang-tidy] Fix a typo: dequeue => dequeHaojian Wu
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@303095 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-26[clang-tidy] Support detecting for-range loop in ↵Haojian Wu
inefficient-vector-operation check. Summary: Also add an option "VectorLikeClasses" allowing user specify customized vectors. Reviewers: alexfh, aaron.ballman Reviewed By: alexfh Subscribers: Eugene.Zelenko, cfe-commits Differential Revision: https://reviews.llvm.org/D32436 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@301440 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24[clang-tidy] Some Cleanups for performance-faster-string-find check.Haojian Wu
NFC git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@301188 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-18[clang-tidy] Address a few late comments.Haojian Wu
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@300588 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-18[clang-tidy] Add a clang-tidy check for possible inefficient vector operationsHaojian Wu
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 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@300534 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-23[clang-tidy] Ignore implicit functions in performance-unnecessary-value-paramMalcolm Parsons
Summary: The performance-unnecessary-value-param check mangled inherited constructors, as the constructors' parameters do not have useful source locations. Fix this by ignoring implicit functions. Fixes PR31684. Reviewers: flx, alexfh, aaron.ballman Subscribers: madsravn, JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D29018 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@292786 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03[clang-tidy] Handle constructors in performance-unnecessary-value-paramMalcolm Parsons
Summary: modernize-pass-by-value doesn't warn about value parameters that cannot be moved, so performance-unnecessary-value-param should. Reviewers: aaron.ballman, flx, alexfh Subscribers: JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D28022 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@290883 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-17[clang-tidy] Remove duplicated check from move-constructor-initMalcolm Parsons
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 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@290051 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-16[clang-tidy] Do not move parameter if only DeclRefExpr occurs inside of a loopFelix Berger
Summary: This fixes a bug where the performance-unnecessary-value-param check suggests a fix to move the parameter inside of a loop which could be invoked multiple times. Reviewers: sbenza, aaron.ballman, alexfh Subscribers: JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D27187 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@289912 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-14[clang-tidy] Suggest including <cmath> if necessary in ↵Justin Lebar
type-promotion-in-math-fn-check. Reviewers: alexfh Subscribers: JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D27748 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@289637 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-14[ClangTidy] Add new performance-type-promotion-in-math-fn check.Justin Lebar
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 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@289627 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02[clang-tidy] Do not trigger unnecessary-value-param check on methods marked ↵Felix Berger
as final Summary: Virtual method overrides of dependent types cannot be recognized unless they are marked as override or final. Exclude methods marked as final from check and add test. Reviewers: sbenza, hokein, alexfh Subscribers: malcolm.parsons, JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D27248 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@288502 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-10[clang-tidy] Do not issue fix for functions that are referenced outside of ↵Felix Berger
callExpr Summary: Suppress fixes for functions that are referenced within the compilation unit outside of a call expression as the signature change could break the code referencing the function. We still issue a warning in this case so that users can decide to manually change the function signature. Reviewers: alexfh, sbenza, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26203 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@286424 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-08[clang-tools-extra] Format sources with clang-format. NFC.Mandeep Singh Grang
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 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@286221 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-08[clang-tidy] Don't warn implicit variables in ↵Haojian Wu
peformance-unnecessary-copy-initialization. Summary: This will prevent the check warning the variables which have been implicitly added by compiler, like the following case (in for-range loop): the variable '__end' is copy-constructed from a const reference... Reviewers: alexfh Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25911 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@286186 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-04[ClangTidy - performance-unnecessary-value-param] Only add "const" when ↵Felix Berger
current parameter is not already const qualified Reviewers: alexfh, sbenza, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26207 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@286010 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-03[clang-tidy] Inefficient string operationAlexander Kornienko
Patch by Bittner Barni! Differential revision: https://reviews.llvm.org/D20196 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@277677 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01[clang-tidy] remove trailing whitespaces and retabKirill Bobyrev
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@277340 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-05[clang-tidy] UnnecessaryValueParamCheck - only warn for virtual methodsFelix Berger
Summary: As changing virtual methods could break method overrides disable applying the fix and just warn. Reviewers: alexfh, sbenza Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21936 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@274552 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01[clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const ↵Felix Berger
value parameter can be moved. Summary: Make check more useful in the following two cases: The parameter is passed by non-const value, has a non-deleted move constructor and is only referenced once in the function as argument to the type's copy constructor. The parameter is passed by non-const value, has a non-deleted move assignment operator and is only referenced once in the function as argument of the the type's copy assignment operator. In this case suggest a fix to move the parameter which avoids the unnecessary copy and is closest to what the user might have intended. Reviewers: alexfh, sbenza Subscribers: cfe-commits, Prazek Differential Revision: http://reviews.llvm.org/D20277 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@274380 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31[clang-tidy] UnnecessaryCopyInitialization - Extend to trigger on non-const ↵Felix Berger
"this" object argument if it is not modified. Summary: Also trigger the check in the following case: void foo() { ExpensiveToCopy Obj; const auto UnnecessaryCopy = Obj.constReference(); Obj.onlyUsedAsConst(); } i.e. when the object the method is called on is not const but is never modified. Reviewers: alexfh, fowles Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20010 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@271239 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-17[clang-tidy] Lift common matchers to utils namespaceEtienne Bergeron
Summary: This patch is lifting matchers used by more than one checkers to the common namespace. Reviewers: aaron.ballman, alexfh Subscribers: aaron.ballman, cfe-commits Differential Revision: http://reviews.llvm.org/D19841 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@269804 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13[clang-tidy] - PerformanceUnnecesaryCopyInitialization - only trigger for ↵Felix Berger
decl stmts with single VarDecl. Summary: This fixes bug: https://llvm.org/bugs/show_bug.cgi?id=27325 Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19865 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@269389 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10[clang-tidy] Lift parsing of sequence of names functions to utils.Etienne Bergeron
Summary: Lift some common code used by multiple checkers. This function is also used by checkers that are coming. It is quite common for a checker to parse a list of names. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19846 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@269065 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-03[clang-tidy] Cleanup namespace in utils folder.Etienne Bergeron
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 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@268356 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-02[clang-tidy] Cleaning namespaces to be more consistant across checkers.Etienne Bergeron
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 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@268264 91177308-0d34-0410-b5e6-96231b3b80d8