[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:56:35 PDT 2023


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 [readability-reference-to-constructed-temporary]
- clang/lib/Sema/SemaChecking.cpp:10096:36: warning: reference variable 'AT2' extends the lifetime of a just-constructed temporary object 'const analyze_printf::ArgType', consider changing reference to value [readability-reference-to-constructed-temporary]


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146368/new/

https://reviews.llvm.org/D146368



More information about the cfe-commits mailing list