Re: [PATCH] D20170: [clang-tidy] TypeTraits - Type is not expensive to copy when it has a deleted copy constructor.

2016-05-12 Thread Felix Berger via cfe-commits
flx added inline comments. Comment at: clang-tidy/utils/TypeTraits.cpp:32 @@ +31,3 @@ + auto *Record = Type->getAsCXXRecordDecl(); + if (Record == nullptr || !Record->hasDefinition()) +return false; aaron.ballman wrote: > `!Record` instead of explicit compar

Re: [PATCH] D20170: [clang-tidy] TypeTraits - Type is not expensive to copy when it has a deleted copy constructor.

2016-05-12 Thread Felix Berger via cfe-commits
flx removed rL LLVM as the repository for this revision. flx updated this revision to Diff 57035. flx marked 5 inline comments as done. http://reviews.llvm.org/D20170 Files: clang-tidy/utils/TypeTraits.cpp test/clang-tidy/performance-unnecessary-value-param.cpp Index: test/clang-tidy/perform

Re: [PATCH] D20170: [clang-tidy] TypeTraits - Type is not expensive to copy when it has a deleted copy constructor.

2016-05-12 Thread Felix Berger via cfe-commits
flx updated this revision to Diff 57129. flx marked 5 inline comments as done. http://reviews.llvm.org/D20170 Files: clang-tidy/utils/TypeTraits.cpp test/clang-tidy/performance-unnecessary-value-param.cpp Index: test/clang-tidy/performance-unnecessary-value-param.cpp

Re: [PATCH] D20170: [clang-tidy] TypeTraits - Type is not expensive to copy when it has a deleted copy constructor.

2016-05-12 Thread Felix Berger via cfe-commits
flx added inline comments. Comment at: clang-tidy/utils/TypeTraits.cpp:24 @@ -20,2 +23,3 @@ + bool classHasTrivialCopyAndDestroy(QualType Type) { auto *Record = Type->getAsCXXRecordDecl(); etienneb wrote: > Should this be lifted to 'type_traits' ? > > > The

[clang-tools-extra] r269389 - [clang-tidy] - PerformanceUnnecesaryCopyInitialization - only trigger for decl stmts with single VarDecl.

2016-05-12 Thread Felix Berger via cfe-commits
Author: flx Date: Thu May 12 21:47:56 2016 New Revision: 269389 URL: http://llvm.org/viewvc/llvm-project?rev=269389&view=rev Log: [clang-tidy] - PerformanceUnnecesaryCopyInitialization - only trigger for decl stmts with single VarDecl. Summary: This fixes bug: https://llvm.org/bugs/show_bug.cgi?

Re: [PATCH] D19865: [clang-tidy] - PerformanceUnnecesaryCopyInitialization - only trigger for decl stmts with single VarDecl.

2016-05-12 Thread Felix Berger via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL269389: [clang-tidy] - PerformanceUnnecesaryCopyInitialization - only trigger for… (authored by flx). Changed prior to commit: http://reviews.llvm.org/D19865?vs=56573&id=57130#toc Repository: rL LLVM

Re: [PATCH] D20170: [clang-tidy] TypeTraits - Type is not expensive to copy when it has a deleted copy constructor.

2016-05-14 Thread Felix Berger via cfe-commits
flx updated this revision to Diff 57286. flx marked 3 inline comments as done. http://reviews.llvm.org/D20170 Files: clang-tidy/utils/TypeTraits.cpp clang-tidy/utils/TypeTraits.h test/clang-tidy/performance-unnecessary-value-param.cpp Index: test/clang-tidy/performance-unnecessary-value-pa

Re: [PATCH] D20170: [clang-tidy] TypeTraits - Type is not expensive to copy when it has a deleted copy constructor.

2016-05-14 Thread Felix Berger via cfe-commits
flx added inline comments. Comment at: clang-tidy/utils/TypeTraits.cpp:42 @@ -27,3 +41,3 @@ llvm::Optional isExpensiveToCopy(QualType Type, ASTContext &Context) { if (Type->isDependentType()) etienneb wrote: > You're right too. > But, it's possible to fix th

Re: [PATCH] D20170: [clang-tidy] TypeTraits - Type is not expensive to copy when it has a deleted copy constructor.

2016-05-14 Thread Felix Berger via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL269581: [clang-tidy] TypeTraits - Type is not expensive to copy when it has a deleted… (authored by flx). Changed prior to commit: http://reviews.llvm.org/D20170?vs=57286&id=57287#toc Repository: rL

[clang-tools-extra] r269581 - [clang-tidy] TypeTraits - Type is not expensive to copy when it has a deleted copy constructor.

2016-05-14 Thread Felix Berger via cfe-commits
Author: flx Date: Sat May 14 17:43:50 2016 New Revision: 269581 URL: http://llvm.org/viewvc/llvm-project?rev=269581&view=rev Log: [clang-tidy] TypeTraits - Type is not expensive to copy when it has a deleted copy constructor. Reviewers: alexfh, sbenza Subscribers: etienneb, aaron.ballman, cfe-c

[PATCH] D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.

2016-05-15 Thread Felix Berger via cfe-commits
flx created this revision. flx added reviewers: alexfh, sbenza. flx added a subscriber: cfe-commits. flx set the repository for this revision to rL LLVM. Make check more useful in the following two cases: 1. The parameter is passed by non-const value, has a non-deleted move constructor and is on

Re: [PATCH] D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.

2016-05-18 Thread Felix Berger via cfe-commits
flx marked 4 inline comments as done. flx added a comment. Thanks for the feedback! http://reviews.llvm.org/D20277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.

2016-05-18 Thread Felix Berger via cfe-commits
flx added inline comments. Comment at: clang-tidy/utils/TypeTraits.cpp:131 @@ +130,3 @@ + for (const auto *Constructor : Record->ctors()) { +if (Constructor->isMoveConstructor() && !Constructor->isDeleted()) + return true; Sorry I missed this. Will addre

Re: [PATCH] D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.

2016-05-18 Thread Felix Berger via cfe-commits
flx removed rL LLVM as the repository for this revision. flx updated this revision to Diff 57620. http://reviews.llvm.org/D20277 Files: clang-tidy/performance/UnnecessaryValueParamCheck.cpp clang-tidy/performance/UnnecessaryValueParamCheck.h clang-tidy/utils/CMakeLists.txt clang-tidy/util

Re: [PATCH] D18300: [clang-tidy] ProTypeMemberInitCheck - check that field decls do not have in-class initializer

2016-04-26 Thread Felix Berger via cfe-commits
I should free up again soon, just caught the flu though. Maybe next week? Feel free to commit before then. On Tue, Apr 26, 2016 at 5:52 AM, Alexander Kornienko wrote: > alexfh added a comment. > > Felix, do you have time to commit the patch or should I do this for you? > > > Repository: > rL L

Re: [PATCH] D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.

2016-05-23 Thread Felix Berger via cfe-commits
flx updated this revision to Diff 58090. http://reviews.llvm.org/D20277 Files: clang-tidy/performance/UnnecessaryValueParamCheck.cpp clang-tidy/performance/UnnecessaryValueParamCheck.h clang-tidy/utils/CMakeLists.txt clang-tidy/utils/DeclRefExprUtils.cpp clang-tidy/utils/DeclRefExprUtil

Re: [PATCH] D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.

2016-05-23 Thread Felix Berger via cfe-commits
flx added inline comments. Comment at: clang-tidy/utils/TypeTraits.cpp:131 @@ +130,3 @@ + return Record->hasNonTrivialMoveConstructor(); +} + Done. Shortened this now to just check whether the type has a non-trivial move constructor or assignment operator. For t

Re: [PATCH] D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.

2016-05-23 Thread Felix Berger via cfe-commits
flx updated this revision to Diff 58093. flx added a comment. Upated documentation as well. http://reviews.llvm.org/D20277 Files: clang-tidy/performance/UnnecessaryValueParamCheck.cpp clang-tidy/performance/UnnecessaryValueParamCheck.h clang-tidy/utils/CMakeLists.txt clang-tidy/utils/De

Re: [PATCH] D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.

2016-05-23 Thread Felix Berger via cfe-commits
flx added a comment. In http://reviews.llvm.org/D20277#436717, @Prazek wrote: > Cool check! Did you think about sugesting std::move for rvalue references if > they are used once? Thanks! I'm not sure this fits with what a user would expect from a check named "unnecessary-value-param" since in

Re: [PATCH] D20010: [clang-tidy] UnnecessaryCopyInitialization - Extend to trigger on non-const "this" object argument if it is not modified

2016-05-23 Thread Felix Berger via cfe-commits
flx removed rL LLVM as the repository for this revision. flx updated this revision to Diff 58181. flx marked an inline comment as done. http://reviews.llvm.org/D20010 Files: clang-tidy/performance/UnnecessaryCopyInitialization.cpp clang-tidy/performance/UnnecessaryCopyInitialization.h test/

Re: [PATCH] D20010: [clang-tidy] UnnecessaryCopyInitialization - Extend to trigger on non-const "this" object argument if it is not modified

2016-05-23 Thread Felix Berger via cfe-commits
flx added a comment. In http://reviews.llvm.org/D20010#427510, @alexfh wrote: > How many more (in relative numbers) results does this check generate now? 147% more :) http://reviews.llvm.org/D20010 ___ cfe-commits mailing list cfe-commits@lists.l

Re: [PATCH] D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.

2016-05-26 Thread Felix Berger via cfe-commits
flx added a comment. This is ready for review again. http://reviews.llvm.org/D20277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D20010: [clang-tidy] UnnecessaryCopyInitialization - Extend to trigger on non-const "this" object argument if it is not modified

2016-05-26 Thread Felix Berger via cfe-commits
flx added a comment. Friendly ping. http://reviews.llvm.org/D20010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r271239 - [clang-tidy] UnnecessaryCopyInitialization - Extend to trigger on non-const "this" object argument if it is not modified.

2016-05-30 Thread Felix Berger via cfe-commits
Author: flx Date: Mon May 30 19:25:57 2016 New Revision: 271239 URL: http://llvm.org/viewvc/llvm-project?rev=271239&view=rev Log: [clang-tidy] UnnecessaryCopyInitialization - Extend to trigger on non-const "this" object argument if it is not modified. Summary: Also trigger the check in the foll

Re: [PATCH] D20010: [clang-tidy] UnnecessaryCopyInitialization - Extend to trigger on non-const "this" object argument if it is not modified

2016-05-30 Thread Felix Berger via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL271239: [clang-tidy] UnnecessaryCopyInitialization - Extend to trigger on non-const… (authored by flx). Changed prior to commit: http://reviews.llvm.org/D20010?vs=58181&id=59010#toc Repository: rL LL

Re: [PATCH] D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.

2016-05-30 Thread Felix Berger via cfe-commits
flx added a comment. Alex, Sam, could you take another look? It'd be great to get this change in to make the check more useful. http://reviews.llvm.org/D20277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

Re: [PATCH] D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.

2016-05-31 Thread Felix Berger via cfe-commits
flx added a comment. In http://reviews.llvm.org/D20277#444023, @Prazek wrote: > In http://reviews.llvm.org/D20277#436725, @flx wrote: > > > In http://reviews.llvm.org/D20277#436717, @Prazek wrote: > > > > > Cool check! Did you think about sugesting std::move for rvalue references > > > if they a

Re: [PATCH] D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.

2016-05-31 Thread Felix Berger via cfe-commits
flx added inline comments. Comment at: clang-tidy/performance/UnnecessaryValueParamCheck.cpp:34 @@ -29,1 +33,3 @@ +template bool isSetDifferenceEmpty(const S &S1, const S &S2) { + for (const auto &E : S1) sbenza wrote: > isSubset? In the caller code it seems t

Re: [PATCH] D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.

2016-05-31 Thread Felix Berger via cfe-commits
flx updated this revision to Diff 59157. flx marked 2 inline comments as done. http://reviews.llvm.org/D20277 Files: clang-tidy/performance/UnnecessaryValueParamCheck.cpp clang-tidy/performance/UnnecessaryValueParamCheck.h clang-tidy/utils/DeclRefExprUtils.cpp clang-tidy/utils/DeclRefExpr

Re: [PATCH] D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.

2016-05-31 Thread Felix Berger via cfe-commits
flx updated this revision to Diff 59167. http://reviews.llvm.org/D20277 Files: clang-tidy/performance/UnnecessaryValueParamCheck.cpp clang-tidy/performance/UnnecessaryValueParamCheck.h clang-tidy/utils/DeclRefExprUtils.cpp clang-tidy/utils/DeclRefExprUtils.h clang-tidy/utils/Matchers.h

Re: [PATCH] D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.

2016-07-01 Thread Felix Berger via cfe-commits
flx updated this revision to Diff 62524. flx marked 5 inline comments as done. flx added a comment. Thanks for the review. I addressed all remaining comments. http://reviews.llvm.org/D20277 Files: clang-tidy/performance/UnnecessaryValueParamCheck.cpp clang-tidy/performance/UnnecessaryValueP

Re: [PATCH] D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.

2016-07-01 Thread Felix Berger via cfe-commits
flx added inline comments. Comment at: clang-tidy/performance/UnnecessaryValueParamCheck.cpp:34 @@ -29,1 +33,3 @@ +template bool isSetDifferenceEmpty(const S &S1, const S &S2) { + for (const auto &E : S1) alexfh wrote: > +1 to `isSubset`. And please add a comm

[clang-tools-extra] r274380 - [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.

2016-07-01 Thread Felix Berger via cfe-commits
Author: flx Date: Fri Jul 1 15:12:15 2016 New Revision: 274380 URL: http://llvm.org/viewvc/llvm-project?rev=274380&view=rev Log: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved. Summary: Make check more useful in the following two cases:

Re: [PATCH] D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.

2016-07-01 Thread Felix Berger via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL274380: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const… (authored by flx). Changed prior to commit: http://reviews.llvm.org/D20277?vs=62524&id=62530#toc Repository: rL LLV

[PATCH] D21936: [clang-tidy] UnnecessaryValueParamCheck - only warn for virtual methods

2016-07-01 Thread Felix Berger via cfe-commits
flx created this revision. flx added reviewers: alexfh, sbenza. flx added a subscriber: cfe-commits. flx set the repository for this revision to rL LLVM. As changing virtual methods could break method overrides disable applying the fix and just warn. Repository: rL LLVM http://reviews.llvm.or

Re: [PATCH] D21936: [clang-tidy] UnnecessaryValueParamCheck - only warn for virtual methods

2016-07-05 Thread Felix Berger via cfe-commits
flx removed rL LLVM as the repository for this revision. flx updated this revision to Diff 62750. http://reviews.llvm.org/D21936 Files: clang-tidy/performance/UnnecessaryValueParamCheck.cpp test/clang-tidy/performance-unnecessary-value-param.cpp Index: test/clang-tidy/performance-unnecessary

Re: [PATCH] D21936: [clang-tidy] UnnecessaryValueParamCheck - only warn for virtual methods

2016-07-05 Thread Felix Berger via cfe-commits
flx added inline comments. Comment at: test/clang-tidy/performance-unnecessary-value-param.cpp:234 @@ +233,3 @@ +}; + +struct PositiveNonVirualMethod { alexfh wrote: > Please add a test for an override not explicitly marked "virtual" or > "override". That case is

[clang-tools-extra] r274552 - [clang-tidy] UnnecessaryValueParamCheck - only warn for virtual methods

2016-07-05 Thread Felix Berger via cfe-commits
Author: flx Date: Tue Jul 5 09:40:44 2016 New Revision: 274552 URL: http://llvm.org/viewvc/llvm-project?rev=274552&view=rev Log: [clang-tidy] UnnecessaryValueParamCheck - only warn for virtual methods Summary: As changing virtual methods could break method overrides disable applying the fix an

Re: [PATCH] D21936: [clang-tidy] UnnecessaryValueParamCheck - only warn for virtual methods

2016-07-05 Thread Felix Berger via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL274552: [clang-tidy] UnnecessaryValueParamCheck - only warn for virtual methods (authored by flx). Changed prior to commit: http://reviews.llvm.org/D21936?vs=62750&id=62752#toc Repository: rL LLVM h

Re: [PATCH] D17488: Extend UnnecessaryCopyInitialization check to trigger on non-const copies that can be safely converted to const references.

2016-02-27 Thread Felix Berger via cfe-commits
flx removed rL LLVM as the repository for this revision. flx updated this revision to Diff 49306. flx marked 5 inline comments as done. http://reviews.llvm.org/D17488 Files: clang-tidy/performance/ForRangeCopyCheck.cpp clang-tidy/performance/UnnecessaryCopyInitialization.cpp clang-tidy/perf

Re: [PATCH] D17488: Extend UnnecessaryCopyInitialization check to trigger on non-const copies that can be safely converted to const references.

2016-02-27 Thread Felix Berger via cfe-commits
flx added inline comments. Comment at: clang-tidy/performance/UnnecessaryCopyInitialization.h:19 @@ -18,3 +18,3 @@ -// A check that detects const local variable declarations that are copy +// A check that detects local variable declarations that are copy // initialized with the

Re: [PATCH] D17491: Add performance check to flag function parameters of expensive to copy types that can be safely converted to const references.

2016-02-27 Thread Felix Berger via cfe-commits
flx added inline comments. Comment at: clang-tidy/performance/UnnecessaryValueParamCheck.cpp:41 @@ +40,3 @@ + Function->parameters().begin(); + if (Index >= Function->getNumParams()) { +return; alexfh wrote: > Please add a comment about

Re: [PATCH] D17491: Add performance check to flag function parameters of expensive to copy types that can be safely converted to const references.

2016-02-27 Thread Felix Berger via cfe-commits
flx removed rL LLVM as the repository for this revision. flx updated this revision to Diff 49307. flx marked 6 inline comments as done. http://reviews.llvm.org/D17491 Files: clang-tidy/performance/CMakeLists.txt clang-tidy/performance/PerformanceTidyModule.cpp clang-tidy/performance/Unneces

Re: [PATCH] D17488: Extend UnnecessaryCopyInitialization check to trigger on non-const copies that can be safely converted to const references.

2016-03-05 Thread Felix Berger via cfe-commits
flx updated this revision to Diff 49884. flx marked an inline comment as done. http://reviews.llvm.org/D17488 Files: clang-tidy/performance/ForRangeCopyCheck.cpp clang-tidy/performance/UnnecessaryCopyInitialization.cpp clang-tidy/performance/UnnecessaryCopyInitialization.h clang-tidy/util

[clang-tools-extra] r262781 - [clang-tidy] Extend UnnecessaryCopyInitialization check to trigger on non-const copies that can be safely converted to const references.

2016-03-05 Thread Felix Berger via cfe-commits
Author: flx Date: Sat Mar 5 15:17:58 2016 New Revision: 262781 URL: http://llvm.org/viewvc/llvm-project?rev=262781&view=rev Log: [clang-tidy] Extend UnnecessaryCopyInitialization check to trigger on non-const copies that can be safely converted to const references. Summary: Move code shared bet

Re: [PATCH] D17488: Extend UnnecessaryCopyInitialization check to trigger on non-const copies that can be safely converted to const references.

2016-03-05 Thread Felix Berger via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL262781: [clang-tidy] Extend UnnecessaryCopyInitialization check to trigger on non… (authored by flx). Changed prior to commit: http://reviews.llvm.org/D17488?vs=49884&id=49885#toc Repository: rL LLVM

r262806 - [ASTMatchers] Document that isAnyPointer() matcher also matches Objective-C object pointers.

2016-03-06 Thread Felix Berger via cfe-commits
Author: flx Date: Sun Mar 6 09:27:59 2016 New Revision: 262806 URL: http://llvm.org/viewvc/llvm-project?rev=262806&view=rev Log: [ASTMatchers] Document that isAnyPointer() matcher also matches Objective-C object pointers. Summary: Add test for Objective-C object pointer matching. Reviewers: aa

[PATCH] D18300: [clang-tidy] ProTypeMemberInitCheck - check that field decls do not have in-class initializer

2016-03-19 Thread Felix Berger via cfe-commits
flx created this revision. flx added reviewers: alexfh, JVApen. flx added a subscriber: cfe-commits. flx set the repository for this revision to rL LLVM. This fixes bug https://llvm.org/bugs/show_bug.cgi?id=26747 Repository: rL LLVM http://reviews.llvm.org/D18300 Files: clang-tidy/cppcoregu

Re: [PATCH] D18300: [clang-tidy] ProTypeMemberInitCheck - check that field decls do not have in-class initializer

2016-03-20 Thread Felix Berger via cfe-commits
flx added inline comments. Comment at: test/clang-tidy/cppcoreguidelines-pro-type-member-init.cpp:94 @@ +93,3 @@ + bool Bool{false}; + // CHECK-FIXES: bool Bool{false}; +}; aaron.ballman wrote: > Why is this checking a fix? I thought that point was that this sho

Re: [PATCH] D17491: Add performance check to flag function parameters of expensive to copy types that can be safely converted to const references.

2016-03-22 Thread Felix Berger via cfe-commits
flx updated the summary for this revision. flx updated this revision to Diff 51385. flx marked 5 inline comments as done. flx added a comment. After testing the check against a large corpus I was able to remove the unnecessary param index check. But I discovered that the check crashed on value

Re: [PATCH] D17491: Add performance check to flag function parameters of expensive to copy types that can be safely converted to const references.

2016-03-22 Thread Felix Berger via cfe-commits
flx added inline comments. Comment at: clang-tidy/performance/UnnecessaryValueParamCheck.cpp:42 @@ +41,3 @@ + decl().bind("param")); + Finder->addMatcher( + functionDecl(isDefinition(), unless(cxxMethodDecl(isOverride())), alexfh wrote: > Ca

Re: [PATCH] D17491: Add performance check to flag function parameters of expensive to copy types that can be safely converted to const references.

2016-03-26 Thread Felix Berger via cfe-commits
flx added inline comments. Comment at: clang-tidy/performance/UnnecessaryValueParamCheck.cpp:26 @@ +25,3 @@ + return (Name.empty() ? llvm::Twine('#') + llvm::Twine(Index + 1) + : llvm::Twine('\'') + Name + llvm::Twine('\'')) + .str(); a

[clang-tools-extra] r264694 - [clang-tidy] Add performance check to flag function parameters of expensive to copy types that can be safely converted to const references.

2016-03-28 Thread Felix Berger via cfe-commits
Author: flx Date: Mon Mar 28 21:42:38 2016 New Revision: 264694 URL: http://llvm.org/viewvc/llvm-project?rev=264694&view=rev Log: [clang-tidy] Add performance check to flag function parameters of expensive to copy types that can be safely converted to const references. Reviewers: alexfh Subscri

Re: [PATCH] D17491: Add performance check to flag function parameters of expensive to copy types that can be safely converted to const references.

2016-03-28 Thread Felix Berger via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL264694: [clang-tidy] Add performance check to flag function parameters of expensive… (authored by flx). Changed prior to commit: http://reviews.llvm.org/D17491?vs=51385&id=51869#toc Repository: rL LL

Re: [PATCH] D15623: Add UnnecessaryCopyInitialization check to new "performance" module in ClangTidy

2015-12-29 Thread Felix Berger via cfe-commits
flx updated this revision to Diff 43743. flx marked 2 inline comments as done. http://reviews.llvm.org/D15623 Files: clang-tidy/CMakeLists.txt clang-tidy/Makefile clang-tidy/performance/CMakeLists.txt clang-tidy/performance/PerformanceTidyModule.cpp clang-tidy/performance/UnnecessaryCop

Re: [PATCH] D16517: ClangTidy check to flag uninitialized builtin and pointer fields.

2016-01-24 Thread Felix Berger via cfe-commits
flx removed rL LLVM as the repository for this revision. flx updated this revision to Diff 45837. flx added a comment. Removed unused include and changed casing on Builder variable. http://reviews.llvm.org/D16517 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp cla

Re: [PATCH] D16517: ClangTidy check to flag uninitialized builtin and pointer fields.

2016-01-24 Thread Felix Berger via cfe-commits
flx updated this revision to Diff 45838. http://reviews.llvm.org/D16517 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/UninitializedFieldCheck.cpp clang-tidy/misc/UninitializedFieldCheck.h docs/clang-tidy/checks/misc-uninitialized-field.rst te

Re: [PATCH] D16517: ClangTidy check to flag uninitialized builtin and pointer fields.

2016-01-26 Thread Felix Berger via cfe-commits
flx added a comment. In http://reviews.llvm.org/D16517#336148, @alexfh wrote: > A high-level comment: I think, this comment > still applies. I'm also slightly > concerned about having this check in misc-, since the check isn't universally > applicable (e

[clang-tools-extra] [clang-tidy] `doesNotMutateObject`: Handle calls to member functions … (PR #94362)

2024-06-05 Thread Felix Berger via cfe-commits
@@ -259,9 +258,9 @@ void UnnecessaryCopyInitialization::registerMatchers(MatchFinder *Finder) { .bind("blockStmt"); }; - Finder->addMatcher(LocalVarCopiedFrom(anyOf(isConstRefReturningFunctionCall(), - isConstRefReturni

[clang-tools-extra] [clang-tidy] `doesNotMutateObject`: Handle calls to member functions … (PR #94362)

2024-06-05 Thread Felix Berger via cfe-commits
@@ -36,6 +36,111 @@ void extractNodesByIdTo(ArrayRef Matches, StringRef ID, Nodes.insert(Match.getNodeAs(ID)); } +// If `D` has a const-qualified overload with otherwise identical +// ref-qualifiers, returns that overload. +const CXXMethodDecl *findConstOverload(const CXX

[clang-tools-extra] [clang-tidy] `doesNotMutateObject`: Handle calls to member functions … (PR #94362)

2024-06-05 Thread Felix Berger via cfe-commits
@@ -36,6 +36,111 @@ void extractNodesByIdTo(ArrayRef Matches, StringRef ID, Nodes.insert(Match.getNodeAs(ID)); } +// If `D` has a const-qualified overload with otherwise identical +// ref-qualifiers, returns that overload. +const CXXMethodDecl *findConstOverload(const CXX

[clang-tools-extra] [clang-tidy] `doesNotMutateObject`: Handle calls to member functions … (PR #94362)

2024-06-05 Thread Felix Berger via cfe-commits
@@ -36,6 +36,111 @@ void extractNodesByIdTo(ArrayRef Matches, StringRef ID, Nodes.insert(Match.getNodeAs(ID)); } +// If `D` has a const-qualified overload with otherwise identical +// ref-qualifiers, returns that overload. +const CXXMethodDecl *findConstOverload(const CXX

[clang-tools-extra] [clang-tidy] `doesNotMutateObject`: Handle calls to member functions … (PR #94362)

2024-06-05 Thread Felix Berger via cfe-commits
@@ -36,6 +36,111 @@ void extractNodesByIdTo(ArrayRef Matches, StringRef ID, Nodes.insert(Match.getNodeAs(ID)); } +// If `D` has a const-qualified overload with otherwise identical +// ref-qualifiers, returns that overload. +const CXXMethodDecl *findConstOverload(const CXX

[clang-tools-extra] [clang-tidy] `doesNotMutateObject`: Handle calls to member functions … (PR #94362)

2024-06-07 Thread Felix Berger via cfe-commits
fberger wrote: > Thanks for looking into this. > > > So unfortunately this change won't improve > > `performance-unnecessary-value-param`. > > I can have a look at unifying both in a subsequent PR. > > Simply adding comments to the tickets in question, so the information is not > lost to time

[clang-tools-extra] [clang-tidy] `doesNotMutateObject`: Handle calls to member functions … (PR #94362)

2024-06-07 Thread Felix Berger via cfe-commits
https://github.com/fberger approved this pull request. https://github.com/llvm/llvm-project/pull/94362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a1b1c23 - [clang] ASTMatchers: Fix out-of-bounds access in foreachArgumentWithParamType.

2021-12-15 Thread Felix Berger via cfe-commits
Author: Felix Berger Date: 2021-12-15T12:35:07-05:00 New Revision: a1b1c23a3b5f2cbe38e90140227bb38a7783e574 URL: https://github.com/llvm/llvm-project/commit/a1b1c23a3b5f2cbe38e90140227bb38a7783e574 DIFF: https://github.com/llvm/llvm-project/commit/a1b1c23a3b5f2cbe38e90140227bb38a7783e574.diff

[clang] 54ed30f - [ASTMatchers] Make ParamIndex unsigned.

2021-12-15 Thread Felix Berger via cfe-commits
Author: Felix Berger Date: 2021-12-15T13:47:34-05:00 New Revision: 54ed30fdd63b165efd3d3ce59aa96383fac80712 URL: https://github.com/llvm/llvm-project/commit/54ed30fdd63b165efd3d3ce59aa96383fac80712 DIFF: https://github.com/llvm/llvm-project/commit/54ed30fdd63b165efd3d3ce59aa96383fac80712.diff

[clang-tools-extra] ddebed8 - [clang-tidy] performance-* checks: Match AllowedTypes against qualified type names when they contain "::".

2021-04-06 Thread Felix Berger via cfe-commits
Author: Felix Berger Date: 2021-04-06T15:41:35-04:00 New Revision: ddebed8e9742add4372d54021cb55e06b655cfd6 URL: https://github.com/llvm/llvm-project/commit/ddebed8e9742add4372d54021cb55e06b655cfd6 DIFF: https://github.com/llvm/llvm-project/commit/ddebed8e9742add4372d54021cb55e06b655cfd6.diff

<    1   2