Detects C++ code where a reference variable is used to extend the lifetime of a temporary object that has just been constructed.
More...
#include <ReferenceToConstructedTemporaryCheck.h>
Detects C++ code where a reference variable is used to extend the lifetime of a temporary object that has just been constructed.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/readability/reference-to-constructed-temporary.html
Definition at line 21 of file ReferenceToConstructedTemporaryCheck.h.
◆ ReferenceToConstructedTemporaryCheck()
clang::tidy::readability::ReferenceToConstructedTemporaryCheck::ReferenceToConstructedTemporaryCheck |
( |
StringRef | Name, |
|
|
ClangTidyContext * | Context ) |
|
inline |
◆ check()
void clang::tidy::readability::ReferenceToConstructedTemporaryCheck::check |
( |
const ast_matchers::MatchFinder::MatchResult & | Result | ) |
|
|
override |
◆ getCheckTraversalKind()
std::optional< TraversalKind > clang::tidy::readability::ReferenceToConstructedTemporaryCheck::getCheckTraversalKind |
( |
| ) |
const |
|
override |
◆ isLanguageVersionSupported()
bool clang::tidy::readability::ReferenceToConstructedTemporaryCheck::isLanguageVersionSupported |
( |
const LangOptions & | LangOpts | ) |
const |
|
override |
◆ registerMatchers()
void clang::tidy::readability::ReferenceToConstructedTemporaryCheck::registerMatchers |
( |
ast_matchers::MatchFinder * | Finder | ) |
|
|
override |
The documentation for this class was generated from the following files: