clang-tools 22.0.0git
clang::tidy::fuchsia::StaticallyConstructedObjectsCheck Class Reference

Constructing global, non-trivial objects with static storage is disallowed, unless the object is statically initialized with a constexpr constructor or has no explicit constructor. More...

#include <StaticallyConstructedObjectsCheck.h>

Inheritance diagram for clang::tidy::fuchsia::StaticallyConstructedObjectsCheck:
[legend]

Public Member Functions

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

Constructing global, non-trivial objects with static storage is disallowed, unless the object is statically initialized with a constexpr constructor or has no explicit constructor.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/fuchsia/statically-constructed-objects.html

Definition at line 22 of file StaticallyConstructedObjectsCheck.h.

Constructor & Destructor Documentation

◆ StaticallyConstructedObjectsCheck()

clang::tidy::fuchsia::StaticallyConstructedObjectsCheck::StaticallyConstructedObjectsCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 24 of file StaticallyConstructedObjectsCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::fuchsia::StaticallyConstructedObjectsCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 44 of file StaticallyConstructedObjectsCheck.cpp.

◆ isLanguageVersionSupported()

bool clang::tidy::fuchsia::StaticallyConstructedObjectsCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 26 of file StaticallyConstructedObjectsCheck.h.

◆ registerMatchers()

void clang::tidy::fuchsia::StaticallyConstructedObjectsCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 25 of file StaticallyConstructedObjectsCheck.cpp.


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