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
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -259,9 +258,9 @@ void
UnnecessaryCopyInitialization::registerMatchers(MatchFinder *Finder) {
.bind("blockStmt");
};
-
Finder->addMatcher(LocalVarCopiedFrom(anyOf(isConstRefReturningFunctionCall(),
- isConstRefReturni
https://github.com/fberger approved this pull request.
https://github.com/llvm/llvm-project/pull/84005
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/fberger approved this pull request.
https://github.com/llvm/llvm-project/pull/82617
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -234,6 +239,22 @@ void positiveOnlyAccessedFieldAsConst() {
}
}
+void positiveOnlyAccessedFieldAsConstBinding() {
fberger wrote:
Why `AccessedField` here, it seems to be `JustUsedAsConst` as in other test
names?
https://github.com/llvm/llvm-project/pul
https://github.com/fberger approved this pull request.
https://github.com/llvm/llvm-project/pull/77105
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -234,6 +239,22 @@ void positiveOnlyAccessedFieldAsConst() {
}
}
+void positiveOnlyAccessedFieldAsConstBinding() {
+ for (auto [X, Y] : View>()) {
+// CHECK-MESSAGES: [[@LINE-1]]:13: warning: loop variable is copied but
+// CHECK-FIXES: for (const auto& [X, Y] : V
https://github.com/fberger edited
https://github.com/llvm/llvm-project/pull/77105
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/fberger edited
https://github.com/llvm/llvm-project/pull/73921
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -290,69 +296,72 @@ void UnnecessaryCopyInitialization::check(
// instantiations where the types differ and rely on implicit conversion
would
// no longer compile if we switched to a reference.
if (differentReplacedTemplateParams(
- NewVar->getType(), construc
@@ -290,69 +296,72 @@ void UnnecessaryCopyInitialization::check(
// instantiations where the types differ and rely on implicit conversion
would
// no longer compile if we switched to a reference.
if (differentReplacedTemplateParams(
- NewVar->getType(), construc
https://github.com/fberger approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/73921
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/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
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
Author: Felix Berger
Date: 2021-11-20T15:13:41-05:00
New Revision: fefe20b99313d6b0738806d1504652c3b7edb9e0
URL:
https://github.com/llvm/llvm-project/commit/fefe20b99313d6b0738806d1504652c3b7edb9e0
DIFF:
https://github.com/llvm/llvm-project/commit/fefe20b99313d6b0738806d1504652c3b7edb9e0.diff
Author: Felix Berger
Date: 2021-07-22T16:20:20-04:00
New Revision: cb4c12b6117a6f2989d5745854a94c75cb6a09ba
URL:
https://github.com/llvm/llvm-project/commit/cb4c12b6117a6f2989d5745854a94c75cb6a09ba
DIFF:
https://github.com/llvm/llvm-project/commit/cb4c12b6117a6f2989d5745854a94c75cb6a09ba.diff
Author: Felix Berger
Date: 2021-07-22T15:17:24-04:00
New Revision: 00edae9203c9a4f50da058d4bd25dc2e6a4930c1
URL:
https://github.com/llvm/llvm-project/commit/00edae9203c9a4f50da058d4bd25dc2e6a4930c1
DIFF:
https://github.com/llvm/llvm-project/commit/00edae9203c9a4f50da058d4bd25dc2e6a4930c1.diff
Author: Felix Berger
Date: 2021-07-12T16:23:04-04:00
New Revision: 0ec812023b43992810499b04222348fdbdb41ef2
URL:
https://github.com/llvm/llvm-project/commit/0ec812023b43992810499b04222348fdbdb41ef2
DIFF:
https://github.com/llvm/llvm-project/commit/0ec812023b43992810499b04222348fdbdb41ef2.diff
Author: Felix Berger
Date: 2021-07-12T09:55:27-04:00
New Revision: 187e050b33bbee1ef210c83f5595c283ba671909
URL:
https://github.com/llvm/llvm-project/commit/187e050b33bbee1ef210c83f5595c283ba671909
DIFF:
https://github.com/llvm/llvm-project/commit/187e050b33bbee1ef210c83f5595c283ba671909.diff
Author: Felix Berger
Date: 2021-06-18T15:25:17-04:00
New Revision: bdd5da9dec61072f693726d9ed2a94c78e431ba2
URL:
https://github.com/llvm/llvm-project/commit/bdd5da9dec61072f693726d9ed2a94c78e431ba2
DIFF:
https://github.com/llvm/llvm-project/commit/bdd5da9dec61072f693726d9ed2a94c78e431ba2.diff
Author: Felix Berger
Date: 2021-06-09T16:36:53-04:00
New Revision: efa4dbc32ca9b7f3319edbcc6ac502ea962c8f0a
URL:
https://github.com/llvm/llvm-project/commit/efa4dbc32ca9b7f3319edbcc6ac502ea962c8f0a
DIFF:
https://github.com/llvm/llvm-project/commit/efa4dbc32ca9b7f3319edbcc6ac502ea962c8f0a.diff
Author: Felix Berger
Date: 2021-06-09T15:52:48-04:00
New Revision: 5dbe3bf4b8dbb7e67d41c7c1360f15d512dd72a0
URL:
https://github.com/llvm/llvm-project/commit/5dbe3bf4b8dbb7e67d41c7c1360f15d512dd72a0
DIFF:
https://github.com/llvm/llvm-project/commit/5dbe3bf4b8dbb7e67d41c7c1360f15d512dd72a0.diff
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
Author: Felix Berger
Date: 2021-03-02T20:02:48-05:00
New Revision: a189b3b9e8bb398d9fe8770956f8ad1d58c2a214
URL:
https://github.com/llvm/llvm-project/commit/a189b3b9e8bb398d9fe8770956f8ad1d58c2a214
DIFF:
https://github.com/llvm/llvm-project/commit/a189b3b9e8bb398d9fe8770956f8ad1d58c2a214.diff
Author: Felix Berger
Date: 2020-12-10T16:58:17-05:00
New Revision: 671ad580610ad91139358b7786e02ff70433a90e
URL:
https://github.com/llvm/llvm-project/commit/671ad580610ad91139358b7786e02ff70433a90e
DIFF:
https://github.com/llvm/llvm-project/commit/671ad580610ad91139358b7786e02ff70433a90e.diff
Author: Felix Berger
Date: 2020-11-16T17:08:18-05:00
New Revision: ace9653c11c6308401dcda2e8b26bf97e6e66e30
URL:
https://github.com/llvm/llvm-project/commit/ace9653c11c6308401dcda2e8b26bf97e6e66e30
DIFF:
https://github.com/llvm/llvm-project/commit/ace9653c11c6308401dcda2e8b26bf97e6e66e30.diff
Author: Felix Berger
Date: 2020-10-21T17:20:35-04:00
New Revision: 1c1f794c2b645ba33a98f0359bc9d30bbef89920
URL:
https://github.com/llvm/llvm-project/commit/1c1f794c2b645ba33a98f0359bc9d30bbef89920
DIFF:
https://github.com/llvm/llvm-project/commit/1c1f794c2b645ba33a98f0359bc9d30bbef89920.diff
Author: flx
Date: Tue Jul 25 17:45:41 2017
New Revision: 309067
URL: http://llvm.org/viewvc/llvm-project?rev=309067&view=rev
Log:
[clang-tidy] Do not issue fixit for explicit template specializations
Summary:
Do not issue fixit in UnnecessaryValueParamCheck if the function is an explicit
templa
Author: flx
Date: Thu Jan 19 09:51:10 2017
New Revision: 292491
URL: http://llvm.org/viewvc/llvm-project?rev=292491&view=rev
Log:
[clang-tidy] Do not trigger move fix for non-copy assignment operators in
performance-unnecessary-value-param check
Reviewers: alexfh, sbenza, malcolm.parsons
Subscr
Author: flx
Date: Thu Dec 15 20:47:56 2016
New Revision: 289912
URL: http://llvm.org/viewvc/llvm-project?rev=289912&view=rev
Log:
[clang-tidy] Do not move parameter if only DeclRefExpr occurs inside of a loop
Summary: This fixes a bug where the performance-unnecessary-value-param check
suggests
Author: flx
Date: Fri Dec 2 08:44:16 2016
New Revision: 288502
URL: http://llvm.org/viewvc/llvm-project?rev=288502&view=rev
Log:
[clang-tidy] Do not trigger unnecessary-value-param check on methods marked as
final
Summary: Virtual method overrides of dependent types cannot be recognized unless
flx added a comment.
In https://reviews.llvm.org/D26453#590720, @malcolm.parsons wrote:
> Add ValuesOnly option to modernize-pass-by-value.
Thanks for doing this. Alex, would this work for us?
https://reviews.llvm.org/D26453
___
cfe-commits maili
This revision was automatically updated to reflect the committed changes.
Closed by commit rL286424: [clang-tidy] Do not issue fix for functions that are
referenced outside of… (authored by flx).
Changed prior to commit:
https://reviews.llvm.org/D26203?vs=77343&id=77430#toc
Repository:
rL LL
Author: flx
Date: Wed Nov 9 19:28:22 2016
New Revision: 286424
URL: http://llvm.org/viewvc/llvm-project?rev=286424&view=rev
Log:
[clang-tidy] Do not issue fix for functions that are referenced outside of
callExpr
Summary: Suppress fixes for functions that are referenced within the
compilation u
flx added a comment.
Is the modernize-pass-by-value check configurable in a way to only trigger when
copied constructor arguments are not moved?
I think our use case has been to have move-constructor-init check enabled to
catch cases that can be optimized but not trigger on every constructor th
flx marked an inline comment as done.
flx added a comment.
Thanks for the review!
https://reviews.llvm.org/D26203
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
flx removed rL LLVM as the repository for this revision.
flx updated this revision to Diff 77343.
https://reviews.llvm.org/D26203
Files:
clang-tidy/performance/UnnecessaryValueParamCheck.cpp
test/clang-tidy/performance-unnecessary-value-param.cpp
Index: test/clang-tidy/performance-unnecessa
This revision was automatically updated to reflect the committed changes.
Closed by commit rL286155: [clang-tidy] Move incomplete type test into separate
test file (authored by flx).
Changed prior to commit:
https://reviews.llvm.org/D26369?vs=77094&id=77095#toc
Repository:
rL LLVM
https://r
Author: flx
Date: Mon Nov 7 15:45:58 2016
New Revision: 286155
URL: http://llvm.org/viewvc/llvm-project?rev=286155&view=rev
Log:
[clang-tidy] Move incomplete type test into separate test file
Summary: Move in complete type test which does not compile into its own test
file.
Reviewers: alexfh,
flx marked an inline comment as done.
flx added inline comments.
Comment at: test/clang-tidy/performance-unnecessary-value-param.cpp:257
-
-void PositiveNonConstDeclaration(ExpensiveToCopyType A);
-// CHECK-FIXES: void PositiveNonConstDeclaration(const ExpensiveToCopyType& A);
--
flx marked an inline comment as done.
flx added inline comments.
Comment at: test/clang-tidy/performance-unnecessary-value-param.cpp:257
-
-void PositiveNonConstDeclaration(ExpensiveToCopyType A);
-// CHECK-FIXES: void PositiveNonConstDeclaration(const ExpensiveToCopyType& A);
--
flx removed rL LLVM as the repository for this revision.
flx updated this revision to Diff 77094.
https://reviews.llvm.org/D26369
Files:
test/clang-tidy/performance-unnecessary-value-param-incomplete-type.cpp
test/clang-tidy/performance-unnecessary-value-param.cpp
Index: test/clang-tidy/per
flx added a comment.
Comment at:
clang-tools-extra/trunk/test/clang-tidy/performance-unnecessary-value-param.cpp:241
+
+// Ensure that incomplete types result in an error from the frontend and not a
+// clang-tidy diagnostic about IncompleteType being expensive to copy.
-
flx created this revision.
flx added reviewers: alexfh, aaron.ballman, sbenza.
flx added a subscriber: cfe-commits.
flx set the repository for this revision to rL LLVM.
Move in complete type test which does not compile into its own test file.
Repository:
rL LLVM
https://reviews.llvm.org/D2636
This revision was automatically updated to reflect the committed changes.
Closed by commit rL286010: [ClangTidy - performance-unnecessary-value-param]
Only add "const" when current… (authored by flx).
Changed prior to commit:
https://reviews.llvm.org/D26207?vs=76877&id=76940#toc
Repository:
Author: flx
Date: Fri Nov 4 15:51:31 2016
New Revision: 286010
URL: http://llvm.org/viewvc/llvm-project?rev=286010&view=rev
Log:
[ClangTidy - performance-unnecessary-value-param] Only add "const" when current
parameter is not already const qualified
Reviewers: alexfh, sbenza, aaron.ballman
Sub
This revision was automatically updated to reflect the committed changes.
Closed by commit rL286008: [clang-tidy] Ignore incomplete types when
determining whether they are… (authored by flx).
Changed prior to commit:
https://reviews.llvm.org/D26195?vs=76934&id=76935#toc
Repository:
rL LLVM
Author: flx
Date: Fri Nov 4 15:29:22 2016
New Revision: 286008
URL: http://llvm.org/viewvc/llvm-project?rev=286008&view=rev
Log:
[clang-tidy] Ignore incomplete types when determining whether they are
expensive to copy
Summary: IsExpensiveToCopy can return false positives for incomplete types, s
flx updated this revision to Diff 76934.
https://reviews.llvm.org/D26195
Files:
clang-tidy/utils/TypeTraits.cpp
test/clang-tidy/performance-unnecessary-value-param.cpp
Index: test/clang-tidy/performance-unnecessary-value-param.cpp
flx added a comment.
In https://reviews.llvm.org/D26195#585917, @aaron.ballman wrote:
> In https://reviews.llvm.org/D26195#585198, @flx wrote:
>
> > In https://reviews.llvm.org/D26195#585091, @aaron.ballman wrote:
> >
> > > In https://reviews.llvm.org/D26195#584958, @flx wrote:
> > >
> > > > In h
flx removed rL LLVM as the repository for this revision.
flx updated this revision to Diff 76928.
https://reviews.llvm.org/D26195
Files:
clang-tidy/utils/TypeTraits.cpp
test/clang-tidy/performance-unnecessary-value-param.cpp
Index: test/clang-tidy/performance-unnecessary-value-param.cpp
===
flx added a comment.
Aaron, do you have any other comments or does the patch look good to you?
https://reviews.llvm.org/D26207
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
flx removed rL LLVM as the repository for this revision.
flx updated this revision to Diff 76877.
https://reviews.llvm.org/D26207
Files:
clang-tidy/performance/UnnecessaryValueParamCheck.cpp
test/clang-tidy/performance-unnecessary-value-param.cpp
Index: test/clang-tidy/performance-unnecessa
flx marked an inline comment as done.
flx added inline comments.
Comment at: test/clang-tidy/performance-unnecessary-value-param.cpp:242
+// Case where parameter in declaration is already const-qualified but not in
+// implementation. Make sure a second 'const' is not added to th
flx added inline comments.
Comment at: test/clang-tidy/performance-unnecessary-value-param.cpp:242
+// Case where parameter in declaration is already const-qualified but not in
+// implementation. Make sure a second 'const' is not added to the declaration.
+void PositiveConstDecl
flx added a comment.
In https://reviews.llvm.org/D26195#585091, @aaron.ballman wrote:
> In https://reviews.llvm.org/D26195#584958, @flx wrote:
>
> > In https://reviews.llvm.org/D26195#584730, @aaron.ballman wrote:
> >
> > > In https://reviews.llvm.org/D26195#584724, @flx wrote:
> > >
> > > > In h
flx added inline comments.
Comment at: test/clang-tidy/performance-unnecessary-value-param.cpp:242
+// Case where parameter in declaration is already const-qualified but not in
+// implementation. Make sure a second 'const' is not added to the declaration.
+void PositiveConstDecl
flx updated this revision to Diff 76630.
Repository:
rL LLVM
https://reviews.llvm.org/D26207
Files:
clang-tidy/performance/UnnecessaryValueParamCheck.cpp
test/clang-tidy/performance-unnecessary-value-param.cpp
Index: test/clang-tidy/performance-unnecessary-value-param.cpp
===
flx created this revision.
flx added reviewers: alexfh, sbenza, aaron.ballman.
flx added a subscriber: cfe-commits.
flx set the repository for this revision to rL LLVM.
Repository:
rL LLVM
https://reviews.llvm.org/D26207
Files:
clang-tidy/performance/UnnecessaryValueParamCheck.cpp
test/cla
flx added a comment.
In https://reviews.llvm.org/D26195#584730, @aaron.ballman wrote:
> In https://reviews.llvm.org/D26195#584724, @flx wrote:
>
> > In https://reviews.llvm.org/D26195#584712, @aaron.ballman wrote:
> >
> > > Please add a test case with an incomplete type that would exercise this
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.
Suppress fixes for functions that are referenced within the compilation unit
outside of a call expression as the signature change could break t
flx added a comment.
In https://reviews.llvm.org/D26195#584712, @aaron.ballman wrote:
> Please add a test case with an incomplete type that would exercise this code
> path, otherwise, LGTM.
Hi Aaron,
do you have any advise on how to add an incomplete type? When debugging this I
had a compila
flx created this revision.
flx added a reviewer: alexfh.
flx added a subscriber: cfe-commits.
flx set the repository for this revision to rL LLVM.
IsExpensiveToCopy can return false positives for incomplete types, so ignore
them.
All existing ClangTidy tests that depend on this function still pa
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
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
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
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
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
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
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:
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
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
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
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
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
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
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
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
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
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
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
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
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/
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
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
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
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
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
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
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
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
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
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
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
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
1 - 100 of 168 matches
Mail list logo