[PATCH] D117090: [clang-tidy] Fix `readability-non-const-parameter` for parameter referenced by an lvalue

2022-02-23 Thread gehry via Phabricator via cfe-commits
Sockke updated this revision to Diff 410753. Sockke added a comment. Add a release note and improve test description information. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117090/new/ https://reviews.llvm.org/D117090 Files: clang-tools-extra/clang-tidy/readability/NonConstParamet

[PATCH] D117090: [clang-tidy] Fix `readability-non-const-parameter` for parameter referenced by an lvalue

2022-02-23 Thread gehry via Phabricator via cfe-commits
Sockke added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-non-const-parameter.cpp:293 + // CHECK-MESSAGES-NOT: warning: pointer parameter 'p' can be + int &x = *p; +} MTC wrote: > @Sockke Could you please add the followi

[PATCH] D117090: [clang-tidy] Fix `readability-non-const-parameter` for parameter referenced by an lvalue

2022-02-24 Thread gehry via Phabricator via cfe-commits
Sockke updated this revision to Diff 411288. Sockke added a comment. rebased. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117090/new/ https://reviews.llvm.org/D117090 Files: clang-tools-extra/clang-tidy/readability/NonConstParameterCheck.cpp clang-tools-extra/docs/ReleaseNotes.rs

[PATCH] D117090: [clang-tidy] Fix `readability-non-const-parameter` for parameter referenced by an lvalue

2022-02-24 Thread gehry via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6cbf15e9b5ac: [clang-tidy] Fix `readability-non-const-parameter` for parameter referenced by… (authored by Sockke). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D116593: Fix `performance-unnecessary-value-param` for template specialization

2022-02-25 Thread gehry via Phabricator via cfe-commits
Sockke updated this revision to Diff 411336. Sockke added a comment. Removed the fix for the template. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116593/new/ https://reviews.llvm.org/D116593 Files: clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp clang-to

[PATCH] D116439: [clang-tidy] Fix `readability-const-return-type` for pure virtual function.

2022-02-25 Thread gehry via Phabricator via cfe-commits
Sockke updated this revision to Diff 411372. Sockke added a comment. Removed the fix for the virtual function. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116439/new/ https://reviews.llvm.org/D116439 Files: clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.cpp clang-t

[PATCH] D116439: [clang-tidy] Fix `readability-const-return-type` for pure virtual function.

2022-02-27 Thread gehry via Phabricator via cfe-commits
Sockke updated this revision to Diff 411722. Sockke added a comment. Added a release note. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116439/new/ https://reviews.llvm.org/D116439 Files: clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.cpp clang-tools-extra/docs/Rele

[PATCH] D116593: Fix `performance-unnecessary-value-param` for template specialization

2022-02-27 Thread gehry via Phabricator via cfe-commits
Sockke updated this revision to Diff 411729. Sockke added a comment. Removed the fix for a template. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116593/new/ https://reviews.llvm.org/D116593 Files: clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp clang-tools

[PATCH] D116439: [clang-tidy] Fix `readability-const-return-type` for pure virtual function.

2022-03-01 Thread gehry via Phabricator via cfe-commits
Sockke updated this revision to Diff 412056. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116439/new/ https://reviews.llvm.org/D116439 Files: clang-tools-extra/clang-tidy/readability/ConstReturnTypeCheck.cpp clang-tools-extra/docs/ReleaseNotes.rst clang-tools-extra/test/clang-tidy

[PATCH] D116439: [clang-tidy] Fix `readability-const-return-type` for pure virtual function.

2022-03-01 Thread gehry via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGba54ebeb5eba: [clang-tidy] Fix `readability-const-return-type` for pure virtual function. (authored by Sockke). Repository: rG LLVM Github Monorep

[PATCH] D116593: Fix `performance-unnecessary-value-param` for template specialization

2022-03-02 Thread gehry via Phabricator via cfe-commits
Sockke updated this revision to Diff 412334. Herald added a project: All. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116593/new/ https://reviews.llvm.org/D116593 Files: clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp clang-tools-extra/docs/ReleaseNotes.rst

[PATCH] D116593: Fix `performance-unnecessary-value-param` for template specialization

2022-03-02 Thread gehry via Phabricator via cfe-commits
Sockke updated this revision to Diff 412340. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116593/new/ https://reviews.llvm.org/D116593 Files: clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp clang-tools-extra/docs/ReleaseNotes.rst clang-tools-extra/test/cla

[PATCH] D116439: Fix `readability-const-return-type` for pure virtual function.

2021-12-31 Thread gehry via Phabricator via cfe-commits
Sockke created this revision. Sockke added a reviewer: aaron.ballman. Herald added a subscriber: carlosgalvezp. Sockke requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. It cannot match a `pure virtual function`. This patch fixes t

[PATCH] D116593: Fix `performance-unnecessary-value-param` for template specialization

2022-01-04 Thread gehry via Phabricator via cfe-commits
Sockke created this revision. Sockke added reviewers: aaron.ballman, flx, njames93. Herald added a subscriber: carlosgalvezp. Sockke requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. The checker missed a check for parameter type o

[PATCH] D116593: Fix `performance-unnecessary-value-param` for template specialization

2022-01-04 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. Thanks for your review! Comment at: clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp:177-178 const auto &CurrentParam = *FunctionDecl->getParamDecl(Index); +if (IsExplicitTemplateSpecialization && Function != FunctionDecl

[PATCH] D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg

2022-01-07 Thread gehry via Phabricator via cfe-commits
Sockke updated this revision to Diff 398077. Sockke marked an inline comment as done. Sockke added a comment. Add some checks for `null` and comments for codes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107450/new/ https://reviews.llvm.org/D107450 Files: clang-tools-extra/clang-t

[PATCH] D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg

2022-01-07 Thread gehry via Phabricator via cfe-commits
Sockke added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp:161 + // Generate notes for an invocation with an rvalue reference parameter. + const auto *ReceivingCallExpr = dyn_cast(ReceivingExpr); + const auto *Receiving

[PATCH] D117090: Fix `readability-non-const-parameter` for parameter referenced by an lvalue

2022-01-12 Thread gehry via Phabricator via cfe-commits
Sockke created this revision. Sockke added reviewers: danielmarjamaki, njames93, aaron.ballman, MTC. Herald added a subscriber: carlosgalvezp. Sockke requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. The checker missed a check for

[PATCH] D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg

2022-01-14 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. Friendly ping. @aaron.ballman CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107450/new/ https://reviews.llvm.org/D107450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D116439: [clang-tidy] Fix `readability-const-return-type` for pure virtual function.

2022-01-14 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. Friendly ping. @aaron.ballman Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116439/new/ https://reviews.llvm.org/D116439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D116593: Fix `performance-unnecessary-value-param` for template specialization

2022-01-14 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. Friendly ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116593/new/ https://reviews.llvm.org/D116593 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D117090: [clang-tidy] Fix `readability-non-const-parameter` for parameter referenced by an lvalue

2022-01-14 Thread gehry via Phabricator via cfe-commits
Sockke added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/NonConstParameterCheck.cpp:86-99 + // Data passed by nonconst reference should not be made const. + unsigned ArgNr = 0U; + if (const auto *CD = CE->getConstructor()) { +for

[PATCH] D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg

2021-12-09 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. Kindly ping. @aaron.ballman CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107450/new/ https://reviews.llvm.org/D107450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D115124: [clang-tidy] Fix `readability-container-size-empty` check for smart pointers

2021-12-24 Thread gehry via Phabricator via cfe-commits
Sockke requested changes to this revision. Sockke added a comment. This revision now requires changes to proceed. Could you please add a test case where the smart pointer object is dereferenced before calling `size()`? E.g. `return (*ptr).size() == 0;`. I think this change doesn't work on this t

[PATCH] D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg

2021-12-28 Thread gehry via Phabricator via cfe-commits
Sockke updated this revision to Diff 396385. Sockke added a comment. Sorry for the late reply. I made improvements to the patch in response to the questions you raised. @aaron.ballman CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107450/new/ https://reviews.llvm.org/D107450 Files: c

[PATCH] D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg

2021-12-28 Thread gehry via Phabricator via cfe-commits
Sockke marked 13 inline comments as done. Sockke added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp:145 + if ((!ReceivingCallExpr || + ReceivingCallExpr->getDirectCallee()->isTemplateInstantiation()) && + (!Re

[PATCH] D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg

2021-10-08 Thread gehry via Phabricator via cfe-commits
Sockke updated this revision to Diff 378168. Sockke retitled this revision from "[clang-tidy] Fix wrong FIxIt in performance-move-const-arg" to "[clang-tidy] Fix wrong FixIt in performance-move-const-arg". Sockke added a comment. Sorry for the delayed reply because of National Day. I have updat

[PATCH] D111625: [clang-tidy] bugprone-argument-comment: SourceLocation valid judgment avoid emitting coredump in isInSystemHeader

2021-10-12 Thread gehry via Phabricator via cfe-commits
Sockke created this revision. Sockke added reviewers: aaron.ballman, njames93, george.burgess.iv, hokein. Herald added a subscriber: xazax.hun. Sockke requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. If the Node has an invalid lo

[PATCH] D111625: [clang-tidy] bugprone-argument-comment: SourceLocation valid judgment avoid emitting coredump in isInSystemHeader

2021-10-13 Thread gehry via Phabricator via cfe-commits
Sockke updated this revision to Diff 379296. Sockke edited the summary of this revision. Sockke added a reviewer: MTC. Sockke added a comment. Update! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111625/new/ https://reviews.llvm.org/D111625 Files: clang-tools-extra/clang-tidy/bugpro

[PATCH] D111625: [clang-tidy] bugprone-argument-comment: SourceLocation valid judgment avoid emitting coredump in isInSystemHeader

2021-10-13 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. In D111625#3060978 , @aaron.ballman wrote: > LGTM, thank you! Do you need me to commit on your behalf? I'm happy to do so, > but given the number of quality submissions you've had, I'm wondering if > you'd like to obtain commit

[PATCH] D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg

2021-10-13 Thread gehry via Phabricator via cfe-commits
Sockke marked 12 inline comments as done. Sockke added a comment. Kindly ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107450/new/ https://reviews.llvm.org/D107450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[PATCH] D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg

2021-10-18 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. Hi, Could anyone please review this diff? @whisperity, @aaron.ballman CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107450/new/ https://reviews.llvm.org/D107450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D108370: [clang-tidy] Fix wrong FixIt about union in cppcoreguidelines-pro-type-member-init

2021-08-20 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. Any thoughts? : ) Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp:49 +void forEachFieldWithFilter(const RecordDecl &Record, const T &Fields, +bool &AnyMemberHasInitPerUnion, Func &&Fn) {

[PATCH] D108370: [clang-tidy] Fix wrong FixIt about union in cppcoreguidelines-pro-type-member-init

2021-08-20 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. Any thoughts? : ) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108370/new/ https://reviews.llvm.org/D108370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D107450: [clang-tidy] Fix wrong FIxIt in performance-move-const-arg

2021-08-20 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. Any thoughts? : ) Comment at: clang-tools-extra/test/clang-tidy/checkers/performance-move-const-arg.cpp:263 + forwardToShowInt(std::move(a)); + // CHECK-MESSAGES: :[[@LINE-1]]:20: warning: std::move of the variable 'a' of the trivially-copyable type

[PATCH] D107450: [clang-tidy] Fix wrong FIxIt in performance-move-const-arg

2021-08-20 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. Any thoughts? : ) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107450/new/ https://reviews.llvm.org/D107450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D108370: [clang-tidy] Fix wrong FixIt about union in cppcoreguidelines-pro-type-member-init

2021-08-23 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. Any thoughts? : ) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108370/new/ https://reviews.llvm.org/D108370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[PATCH] D108370: [clang-tidy] Fix wrong FixIt about union in cppcoreguidelines-pro-type-member-init

2021-08-24 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. What do you think? @aaron.ballman @bkramer Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108370/new/ https://reviews.llvm.org/D108370 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D107450: [clang-tidy] Fix wrong FIxIt in performance-move-const-arg

2021-08-24 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. Which do you prefer? @Quuxplusone Comment at: clang-tools-extra/test/clang-tidy/checkers/performance-move-const-arg.cpp:262-263 + int a = 10; + forwardToShowInt(std::move(a)); + // CHECK-MESSAGES: :[[@LINE-1]]:20: warning: std::move of the variable '

[PATCH] D107450: [clang-tidy] Fix wrong FIxIt in performance-move-const-arg

2021-08-31 Thread gehry via Phabricator via cfe-commits
Sockke marked an inline comment as not done. Sockke added a comment. Thanks for your review, I greatly appreciate it. @whisperity There is no wrong case in the original test file, which is why we did not catch the bug in the test suite. From this, I added some new cases. I tested the functions w

[PATCH] D108370: [clang-tidy] Fix wrong FixIt about union in cppcoreguidelines-pro-type-member-init

2021-09-02 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. Hi, Could anyone please review this diff? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108370/new/ https://reviews.llvm.org/D108370 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D108370: [clang-tidy] Fix wrong FixIt about union in cppcoreguidelines-pro-type-member-init

2021-09-13 Thread gehry via Phabricator via cfe-commits
Sockke added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-pro-type-member-init.cpp:534 + +union U2 { + U2() {} aaron.ballman wrote: > A related interesting test would be: > ``` > union U3 { > U3() {} > > struct

[PATCH] D107450: [clang-tidy] Fix wrong FIxIt in performance-move-const-arg

2021-09-13 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. kindly ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107450/new/ https://reviews.llvm.org/D107450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

<    1   2