clang-tools 22.0.0git
clang::tidy::google::objc::GlobalVariableDeclarationCheck Class Reference

The check for Objective-C global variables and constants naming convention. More...

#include <GlobalVariableDeclarationCheck.h>

Inheritance diagram for clang::tidy::google::objc::GlobalVariableDeclarationCheck:
[legend]

Public Member Functions

 GlobalVariableDeclarationCheck (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 for Objective-C global variables and constants naming convention.

The declaration should follow the patterns of 'k[A-Z].*' (constants) or 'g[A-Z].*' (variables).

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/google/objc-global-variable-declaration.html

Definition at line 22 of file GlobalVariableDeclarationCheck.h.

Constructor & Destructor Documentation

◆ GlobalVariableDeclarationCheck()

clang::tidy::google::objc::GlobalVariableDeclarationCheck::GlobalVariableDeclarationCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 24 of file GlobalVariableDeclarationCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::google::objc::GlobalVariableDeclarationCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 77 of file GlobalVariableDeclarationCheck.cpp.

◆ isLanguageVersionSupported()

bool clang::tidy::google::objc::GlobalVariableDeclarationCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 26 of file GlobalVariableDeclarationCheck.h.

◆ registerMatchers()

void clang::tidy::google::objc::GlobalVariableDeclarationCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 57 of file GlobalVariableDeclarationCheck.cpp.


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