clang-tools 22.0.0git
|
The check flags user-defined move constructors and assignment operators not marked with noexcept or marked with noexcept(expr) where expr evaluates to false (but is not a false literal itself). More...
#include <NoexceptMoveConstructorCheck.h>
Public Member Functions | |
void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
NoexceptFunctionBaseCheck (StringRef Name, ClangTidyContext *Context) | |
Public Member Functions inherited from clang::tidy::performance::NoexceptFunctionBaseCheck | |
NoexceptFunctionBaseCheck (StringRef Name, ClangTidyContext *Context) | |
bool | isLanguageVersionSupported (const LangOptions &LangOpts) const override |
void | check (const ast_matchers::MatchFinder::MatchResult &Result) final override |
std::optional< TraversalKind > | getCheckTraversalKind () const override |
Additional Inherited Members | |
Static Protected Attributes inherited from clang::tidy::performance::NoexceptFunctionBaseCheck | |
static constexpr StringRef | BindFuncDeclName = "FuncDecl" |
The check flags user-defined move constructors and assignment operators not marked with noexcept or marked with noexcept(expr) where expr evaluates to false (but is not a false literal itself).
Move constructors of all the types used with STL containers, for example, need to be declared noexcept. Otherwise STL will choose copy constructors instead. The same is valid for move assignment operations.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/performance/noexcept-move-constructor.html
Definition at line 27 of file NoexceptMoveConstructorCheck.h.
|
inline |
Definition at line 24 of file NoexceptFunctionBaseCheck.h.
|
override |
Definition at line 19 of file NoexceptMoveConstructorCheck.cpp.
References clang::tidy::performance::NoexceptFunctionBaseCheck::BindFuncDeclName.