clang-tools 22.0.0git
clang::tidy::bugprone::UseAfterMoveCheck Class Reference

The check warns if an object is used after it has been moved, without an intervening reinitialization. More...

#include <UseAfterMoveCheck.h>

Inheritance diagram for clang::tidy::bugprone::UseAfterMoveCheck:
[legend]

Public Member Functions

 UseAfterMoveCheck (StringRef Name, ClangTidyContext *Context)
bool isLanguageVersionSupported (const LangOptions &LangOpts) const override
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override

Detailed Description

The check warns if an object is used after it has been moved, without an intervening reinitialization.

For details, see the user-facing documentation: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/use-after-move.html

Definition at line 21 of file UseAfterMoveCheck.h.

Constructor & Destructor Documentation

◆ UseAfterMoveCheck()

clang::tidy::bugprone::UseAfterMoveCheck::UseAfterMoveCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 23 of file UseAfterMoveCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::bugprone::UseAfterMoveCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

◆ isLanguageVersionSupported()

bool clang::tidy::bugprone::UseAfterMoveCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 25 of file UseAfterMoveCheck.h.

◆ registerMatchers()

void clang::tidy::bugprone::UseAfterMoveCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

The documentation for this class was generated from the following files: