clang-tools  14.0.0git
Public Member Functions | Public Attributes | List of all members
clang::tidy::RenamerClangTidyCheck::NamingCheckFailure Struct Reference

Holds an identifier name check failure, tracking the kind of the identifier, its possible fixup and the starting locations of all the identifier usages. More...

#include <RenamerClangTidyCheck.h>

Collaboration diagram for clang::tidy::RenamerClangTidyCheck::NamingCheckFailure:
Collaboration graph
[legend]

Public Member Functions

bool ShouldFix () const
 Whether the failure should be fixed or not. More...
 
bool ShouldNotify () const
 
 NamingCheckFailure ()=default
 

Public Attributes

FailureInfo Info
 
ShouldFixStatus FixStatus = ShouldFixStatus::ShouldFix
 
llvm::DenseSet< SourceLocation > RawUsageLocs
 A set of all the identifier usages starting SourceLocation. More...
 

Detailed Description

Holds an identifier name check failure, tracking the kind of the identifier, its possible fixup and the starting locations of all the identifier usages.

Definition at line 83 of file RenamerClangTidyCheck.h.

Constructor & Destructor Documentation

◆ NamingCheckFailure()

clang::tidy::RenamerClangTidyCheck::NamingCheckFailure::NamingCheckFailure ( )
default

Member Function Documentation

◆ ShouldFix()

bool clang::tidy::RenamerClangTidyCheck::NamingCheckFailure::ShouldFix ( ) const
inline

Whether the failure should be fixed or not.

e.g.: if the identifier was used or declared within a macro we won't offer a fixup for safety reasons.

Definition at line 90 of file RenamerClangTidyCheck.h.

References FixStatus, clang::tidy::RenamerClangTidyCheck::FailureInfo::Fixup, Info, and clang::tidy::RenamerClangTidyCheck::ShouldFix.

Referenced by clang::tidy::RenamerClangTidyCheck::addUsage(), and clang::tidy::RenamerClangTidyCheck::onEndOfTranslationUnit().

◆ ShouldNotify()

bool clang::tidy::RenamerClangTidyCheck::NamingCheckFailure::ShouldNotify ( ) const
inline

Member Data Documentation

◆ FixStatus

ShouldFixStatus clang::tidy::RenamerClangTidyCheck::NamingCheckFailure::FixStatus = ShouldFixStatus::ShouldFix

◆ Info

FailureInfo clang::tidy::RenamerClangTidyCheck::NamingCheckFailure::Info

◆ RawUsageLocs

llvm::DenseSet<SourceLocation> clang::tidy::RenamerClangTidyCheck::NamingCheckFailure::RawUsageLocs

A set of all the identifier usages starting SourceLocation.

Definition at line 101 of file RenamerClangTidyCheck.h.

Referenced by clang::tidy::RenamerClangTidyCheck::addUsage(), and clang::tidy::RenamerClangTidyCheck::onEndOfTranslationUnit().


The documentation for this struct was generated from the following file: