clang-tools  3.9.0
Namespaces | Classes | Typedefs | Functions
clang::tidy::utils Namespace Reference

Namespaces

 decl_ref_expr
 
 fixit
 
 lexer
 
 options
 
 type_traits
 

Classes

class  HeaderGuardCheck
 Finds and fixes header guards. More...
 
class  IncludeInserterCallback
 
class  IncludeInserter
 Produces fixes to insert specified includes to source files, if not yet present. More...
 
class  IncludeSorter
 Class used by IncludeInserterCallback to record the names of the inclusions in a given source file being processed and generate the necessary commands to sort the inclusions according to the precedence encoded in IncludeKinds. More...
 

Typedefs

typedef llvm::SmallSet
< llvm::StringRef, 5 > 
HeaderFileExtensionsSet
 

Functions

bool isExpansionLocInHeaderFile (SourceLocation Loc, const SourceManager &SM, const HeaderFileExtensionsSet &HeaderFileExtensions)
 Checks whether expansion location of Loc is in header file. More...
 
bool isPresumedLocInHeaderFile (SourceLocation Loc, SourceManager &SM, const HeaderFileExtensionsSet &HeaderFileExtensions)
 Checks whether presumed location of Loc is in header file. More...
 
bool isSpellingLocInHeaderFile (SourceLocation Loc, SourceManager &SM, const HeaderFileExtensionsSet &HeaderFileExtensions)
 Checks whether spelling location of Loc is in header file. More...
 
bool parseHeaderFileExtensions (StringRef AllHeaderFileExtensions, HeaderFileExtensionsSet &HeaderFileExtensions, char delimiter)
 Parses header file extensions from a semicolon-separated list. More...
 
static std::string cleanPath (StringRef Path)
 canonicalize a path by removing ./ and ../ components. More...
 

Typedef Documentation

typedef llvm::SmallSet<llvm::StringRef, 5> clang::tidy::utils::HeaderFileExtensionsSet

Definition at line 22 of file HeaderFileExtensionsUtils.h.

Function Documentation

static std::string clang::tidy::utils::cleanPath ( StringRef  Path)
static

canonicalize a path by removing ./ and ../ components.

Definition at line 22 of file HeaderGuard.cpp.

References Path, and Result.

bool clang::tidy::utils::isExpansionLocInHeaderFile ( SourceLocation  Loc,
const SourceManager &  SM,
const HeaderFileExtensionsSet &  HeaderFileExtensions 
)

Checks whether expansion location of Loc is in header file.

Definition at line 18 of file HeaderFileExtensionsUtils.cpp.

bool clang::tidy::utils::isPresumedLocInHeaderFile ( SourceLocation  Loc,
SourceManager &  SM,
const HeaderFileExtensionsSet &  HeaderFileExtensions 
)

Checks whether presumed location of Loc is in header file.

Definition at line 27 of file HeaderFileExtensionsUtils.cpp.

Referenced by clang::tidy::google::build::UnnamedNamespaceInHeaderCheck::check().

bool clang::tidy::utils::isSpellingLocInHeaderFile ( SourceLocation  Loc,
SourceManager &  SM,
const HeaderFileExtensionsSet &  HeaderFileExtensions 
)

Checks whether spelling location of Loc is in header file.

Definition at line 36 of file HeaderFileExtensionsUtils.cpp.

Referenced by clang::tidy::google::readability::GlobalNamesInHeadersCheck::check().

bool clang::tidy::utils::parseHeaderFileExtensions ( StringRef  AllHeaderFileExtensions,
HeaderFileExtensionsSet &  HeaderFileExtensions,
char  delimiter 
)