clang-tools 23.0.0git
clang::tidy::cppcoreguidelines::ProTypeUnionAccessCheck Class Reference

This check flags all access to members of unions. More...

#include <ProTypeUnionAccessCheck.h>

Inheritance diagram for clang::tidy::cppcoreguidelines::ProTypeUnionAccessCheck:
[legend]

Public Member Functions

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

This check flags all access to members of unions.

Access to a union as a whole (e.g. passing to a function) is not flagged.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/pro-type-union-access.html

Definition at line 21 of file ProTypeUnionAccessCheck.h.

Constructor & Destructor Documentation

◆ ProTypeUnionAccessCheck()

clang::tidy::cppcoreguidelines::ProTypeUnionAccessCheck::ProTypeUnionAccessCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 23 of file ProTypeUnionAccessCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::cppcoreguidelines::ProTypeUnionAccessCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 23 of file ProTypeUnionAccessCheck.cpp.

◆ isLanguageVersionSupported()

bool clang::tidy::cppcoreguidelines::ProTypeUnionAccessCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 25 of file ProTypeUnionAccessCheck.h.

◆ registerMatchers()

void clang::tidy::cppcoreguidelines::ProTypeUnionAccessCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 16 of file ProTypeUnionAccessCheck.cpp.


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