clang-tools 3.8.0

- Main Page
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

Classes | Enumerations | Functions | Variables
clang::tidy::readability Namespace Reference

## Classes
class | BracesAroundStatementsCheck
| Checks that bodies of `if` statements and loops (`for`, `range-for`, `do-while`, and `while`) are inside braces. More...
class | ContainerSizeEmptyCheck
| Checks whether a call to the `size()` method can be replaced with a call to `empty()`. More...
class | ElseAfterReturnCheck
| Flags the usages of `else` after `return`. More...
class | FunctionSizeCheck
| Checks for large functions based on various metrics. More...
class | IdentifierNamingCheck
| Checks for identifiers naming style mismatch. More...
class | InconsistentDeclarationParameterNameCheck
| Checks for declarations of functions which differ in parameter names. More...
class | NamedParameterCheck
| Find functions with unnamed arguments. More...
class | NamespaceCommentCheck
| Checks that long namespaces have a closing comment. More...
class | ReadabilityModule
class | RedundantSmartptrGetCheck
| Find and remove redundant calls to smart pointer's `.get()` method. More...
class | RedundantStringCStrCheck
| Finds unnecessary calls to `std::string::c_str()`. More...
class | SimplifyBooleanExprCheck
| Looks for boolean expressions involving boolean constants and simplifies them to use the appropriate boolean expression directly. More...

## Enumerations
enum | StyleKind { SK_Count, SK_Invalid }

## Functions
static FixItHint | removeToken (SourceLocation Loc)
static bool | matchesStyle (StringRef Name, IdentifierNamingCheck::NamingStyle Style)
static std::string | fixupWithCase (StringRef Name, IdentifierNamingCheck::CaseType Case)
static std::string | fixupWithStyle (StringRef Name, IdentifierNamingCheck::NamingStyle Style)
static StyleKind | findStyleKind (const NamedDecl *D, const std::vector< IdentifierNamingCheck::NamingStyle > &NamingStyles)
static void | addUsage (IdentifierNamingCheck::NamingCheckFailureMap &Failures, const NamedDecl *Decl, SourceRange Range, const SourceManager *SM)
static bool | locationsInSameFile (const SourceManager &Sources, SourceLocation Loc1, SourceLocation Loc2)
static std::string | getNamespaceComment (const NamespaceDecl *ND, bool InsertLineBreak)
static ClangTidyModuleRegistry::Add < ReadabilityModule > | X ("readability-module","Adds readability-related checks.")
bool | containsDiscardedTokens (const ast_matchers::MatchFinder::MatchResult &Result, CharSourceRange CharRange)

## Variables
static StringRef const | StyleNames []

## Enumeration Type Documentation

enum clang::tidy::readability::StyleKind

Enumerator
SK_Count |
SK_Invalid |

Definition at line 69 of file IdentifierNamingCheck.cpp.

## Function Documentation

static void clang::tidy::readability::addUsage | ( | IdentifierNamingCheck::NamingCheckFailureMap & | Failures,
|  | const NamedDecl * | Decl,
|  | SourceRange | Range,
|  | const SourceManager * | SM
| ) |  |
| static

Definition at line 504 of file IdentifierNamingCheck.cpp.

Referenced by clang::tidy::readability::IdentifierNamingCheck::check().

bool clang::tidy::readability::containsDiscardedTokens | ( | const ast_matchers::MatchFinder::MatchResult & | Result,
|  | CharSourceRange | CharRange
| ) |  |

Definition at line 491 of file SimplifyBooleanExprCheck.cpp.

static StyleKind clang::tidy::readability::findStyleKind | ( | const NamedDecl * | D,
|  | const std::vector< IdentifierNamingCheck::NamingStyle > & | NamingStyles
| ) |  |
| static

Definition at line 255 of file IdentifierNamingCheck.cpp.

References SK_Invalid.

Referenced by clang::tidy::readability::IdentifierNamingCheck::check().

static std::string clang::tidy::readability::fixupWithCase | ( | StringRef | Name,
|  | IdentifierNamingCheck::CaseType | Case
| ) |  |
| static

Definition at line 175 of file IdentifierNamingCheck.cpp.

References clang::tidy::readability::IdentifierNamingCheck::CT_AnyCase, clang::tidy::readability::IdentifierNamingCheck::CT_CamelBack, clang::tidy::readability::IdentifierNamingCheck::CT_CamelCase, clang::tidy::readability::IdentifierNamingCheck::CT_LowerCase, clang::tidy::readability::IdentifierNamingCheck::CT_UpperCase, and Name.

Referenced by clang::tidy::readability::IdentifierNamingCheck::check(), and fixupWithStyle().

static std::string clang::tidy::readability::fixupWithStyle | ( | StringRef | Name,
|  | IdentifierNamingCheck::NamingStyle | Style
| ) |  |
| static

Definition at line 250 of file IdentifierNamingCheck.cpp.

References clang::tidy::readability::IdentifierNamingCheck::NamingStyle::Case, fixupWithCase(), clang::tidy::readability::IdentifierNamingCheck::NamingStyle::Prefix, and clang::tidy::readability::IdentifierNamingCheck::NamingStyle::Suffix.

Referenced by clang::tidy::readability::IdentifierNamingCheck::check().

static std::string clang::tidy::readability::getNamespaceComment | ( | const NamespaceDecl * | ND,
|  | bool | InsertLineBreak
| ) |  |
| static

Definition at line 49 of file NamespaceCommentCheck.cpp.

References Fix().

Referenced by clang::tidy::readability::NamespaceCommentCheck::check().

static bool clang::tidy::readability::locationsInSameFile | ( | const SourceManager & | Sources,
|  | SourceLocation | Loc1,
|  | SourceLocation | Loc2
| ) |  |
| static

Definition at line 43 of file NamespaceCommentCheck.cpp.

Referenced by clang::tidy::readability::NamespaceCommentCheck::check().

static bool clang::tidy::readability::matchesStyle | ( | StringRef | Name,
|  | IdentifierNamingCheck::NamingStyle | Style
| ) |  |
| static

Definition at line 148 of file IdentifierNamingCheck.cpp.

References clang::tidy::readability::IdentifierNamingCheck::NamingStyle::Case, clang::tidy::readability::IdentifierNamingCheck::NamingStyle::Prefix, and clang::tidy::readability::IdentifierNamingCheck::NamingStyle::Suffix.

Referenced by clang::tidy::readability::IdentifierNamingCheck::check().

static FixItHint clang::tidy::readability::removeToken | ( | SourceLocation | Loc | ) |
| static

Definition at line 31 of file ElseAfterReturnCheck.cpp.

Referenced by clang::tidy::readability::ElseAfterReturnCheck::check().

static ClangTidyModuleRegistry::Add<ReadabilityModule> clang::tidy::readability::X | ( | "readability-module" | ,
|  | "Adds readability-related checks." |
| ) |  |
| static

## Variable Documentation

StringRef const clang::tidy::readability::StyleNames[]
| static

Initial value:
= {
#define STRINGIZE(v)
}

Definition at line 77 of file IdentifierNamingCheck.cpp.

Referenced by clang::tidy::readability::IdentifierNamingCheck::check(), clang::tidy::readability::IdentifierNamingCheck::IdentifierNamingCheck(), and clang::tidy::readability::IdentifierNamingCheck::storeOptions().