clang-tools 22.0.0git
clang::tidy::misc::ConfusableIdentifierCheck Class Reference

Finds symbol which have confusable identifiers, i.e. More...

#include <ConfusableIdentifierCheck.h>

Inheritance diagram for clang::tidy::misc::ConfusableIdentifierCheck:
[legend]

Public Member Functions

 ConfusableIdentifierCheck (StringRef Name, ClangTidyContext *Context)
 ~ConfusableIdentifierCheck ()
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override
void onEndOfTranslationUnit () override
std::optional< TraversalKind > getCheckTraversalKind () const override

Detailed Description

Finds symbol which have confusable identifiers, i.e.

identifiers that look the same visually but have a different Unicode representation. If symbols are confusable but don't live in conflicting namespaces, they are not reported.

Definition at line 21 of file ConfusableIdentifierCheck.h.

Constructor & Destructor Documentation

◆ ConfusableIdentifierCheck()

clang::tidy::misc::ConfusableIdentifierCheck::ConfusableIdentifierCheck ( StringRef Name,
ClangTidyContext * Context )

Definition at line 26 of file ConfusableIdentifierCheck.cpp.

◆ ~ConfusableIdentifierCheck()

clang::tidy::misc::ConfusableIdentifierCheck::~ConfusableIdentifierCheck ( )
default

Member Function Documentation

◆ check()

void clang::tidy::misc::ConfusableIdentifierCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 155 of file ConfusableIdentifierCheck.cpp.

◆ getCheckTraversalKind()

std::optional< TraversalKind > clang::tidy::misc::ConfusableIdentifierCheck::getCheckTraversalKind ( ) const
inlineoverride

Definition at line 29 of file ConfusableIdentifierCheck.h.

◆ onEndOfTranslationUnit()

void clang::tidy::misc::ConfusableIdentifierCheck::onEndOfTranslationUnit ( )
override

◆ registerMatchers()

void clang::tidy::misc::ConfusableIdentifierCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 250 of file ConfusableIdentifierCheck.cpp.


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