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

Piotr Zegar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 18 13:55:33 PDT 2023


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 temporary object is directly constructed by calling
a constructor or using an initializer list and immediately assigned to a
reference variable.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146368

Files:
  clang-tools-extra/clang-tidy/readability/CMakeLists.txt
  clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
  clang-tools-extra/clang-tidy/readability/ReferenceToConstructedTemporaryCheck.cpp
  clang-tools-extra/clang-tidy/readability/ReferenceToConstructedTemporaryCheck.h
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/list.rst
  clang-tools-extra/docs/clang-tidy/checks/readability/reference-to-constructed-temporary.rst
  clang-tools-extra/test/clang-tidy/checkers/readability/reference-to-constructed-temporary.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146368.506326.patch
Type: text/x-patch
Size: 11589 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230318/d1896472/attachment-0001.bin>


More information about the cfe-commits mailing list