[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-29 Thread Piotr Zegar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG87d0aedaa285: [clang-tidy] Add readability-reference-to-constructed-temporary check (authored by PiotrZSL). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-27 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta accepted this revision. xgupta added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146368/new/ https://reviews.llvm.org/D146368

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-25 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. This LGTM, I will wait for two days before accepting the revision in case other reviewers might have some more comments/suggestions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146368/new/

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 544205. PiotrZSL marked an inline comment as done. PiotrZSL added a comment. Rename value to str in doc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146368/new/ https://reviews.llvm.org/D146368 Files:

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL marked 2 inline comments as done. PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/reference-to-constructed-temporary.rst:18 + + const std::string& value("hello"); + xgupta wrote: > PiotrZSL wrote: > >

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-25 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/reference-to-constructed-temporary.rst:18 + + const std::string& value("hello"); + PiotrZSL wrote: > xgupta wrote: > > The below comment is not matching, do you

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 544057. PiotrZSL marked an inline comment as done. PiotrZSL added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146368/new/ https://reviews.llvm.org/D146368 Files:

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL marked 4 inline comments as done. PiotrZSL added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability/reference-to-constructed-temporary.rst:10 +This construction is often the result of multiple code refactorings or a lack +of developer

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-25 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/ReferenceToConstructedTemporaryCheck.cpp:39 + ID) { + NotExtendedByDeclBoundToPredicate Predicate; + Predicate.ID = ID; xgupta wrote: > Can be written using

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-25 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/ReferenceToConstructedTemporaryCheck.cpp:20 + +struct NotExtendedByDeclBoundToPredicate { + bool operator()(const internal::BoundNodesMap ) const { A comment might be good to

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-01 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146368/new/ https://reviews.llvm.org/D146368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-06-07 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146368/new/ https://reviews.llvm.org/D146368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-05-22 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146368/new/ https://reviews.llvm.org/D146368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-04-14 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 513693. PiotrZSL added a comment. Ping + Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146368/new/ https://reviews.llvm.org/D146368 Files: clang-tools-extra/clang-tidy/readability/CMakeLists.txt

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-03-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 506399. PiotrZSL marked 3 inline comments as done. PiotrZSL added a comment. Review comment fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146368/new/ https://reviews.llvm.org/D146368 Files:

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-03-19 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/ReferenceToConstructedTemporaryCheck.cpp:22 + bool operator()(const internal::BoundNodesMap ) const { +auto *Other = Nodes.getNode(ID).get(); +if (!Other) `const

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-03-18 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. There are 2 issues found in llvm repository: - llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp:721:22: warning: reference variable 'S' extends the lifetime of a just-constructed temporary object 'const StringRef', consider changing reference to value

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-03-18 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Detects code where a