clang-tools 22.0.0git
clang::tidy::performance::TriviallyDestructibleCheck Class Reference

A check that finds classes that would be trivial if not for the defaulted destructors declared out-of-line: struct A: TrivialClass { ~A(); TrivialClass trivial_fields; }; A::~A() = default;. More...

#include <TriviallyDestructibleCheck.h>

Inheritance diagram for clang::tidy::performance::TriviallyDestructibleCheck:
[legend]

Public Member Functions

 TriviallyDestructibleCheck (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

A check that finds classes that would be trivial if not for the defaulted destructors declared out-of-line: struct A: TrivialClass { ~A(); TrivialClass trivial_fields; }; A::~A() = default;.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/performance/trivially-destructible.html

Definition at line 26 of file TriviallyDestructibleCheck.h.

Constructor & Destructor Documentation

◆ TriviallyDestructibleCheck()

clang::tidy::performance::TriviallyDestructibleCheck::TriviallyDestructibleCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 28 of file TriviallyDestructibleCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::performance::TriviallyDestructibleCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

◆ isLanguageVersionSupported()

bool clang::tidy::performance::TriviallyDestructibleCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 30 of file TriviallyDestructibleCheck.h.

◆ registerMatchers()

void clang::tidy::performance::TriviallyDestructibleCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 36 of file TriviallyDestructibleCheck.cpp.


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