clang  3.9.0
Public Types | Public Member Functions | Static Public Member Functions | List of all members
clang::analyze_format_string::ArgType Class Reference

#include <FormatString.h>

Public Types

enum  Kind {
  UnknownTy, InvalidTy, SpecificTy, ObjCPointerTy,
  CPointerTy, AnyCharTy, CStrTy, WCStrTy,
  WIntTy
}
 
enum  MatchKind { NoMatch = 0, Match = 1, NoMatchPedantic }
 

Public Member Functions

 ArgType (Kind k=UnknownTy, const char *n=nullptr)
 
 ArgType (QualType t, const char *n=nullptr)
 
 ArgType (CanQualType t)
 
bool isValid () const
 
MatchKind matchesType (ASTContext &C, QualType argTy) const
 
QualType getRepresentativeType (ASTContext &C) const
 
std::string getRepresentativeTypeName (ASTContext &C) const
 

Static Public Member Functions

static ArgType Invalid ()
 
static ArgType PtrTo (const ArgType &A)
 Create an ArgType which corresponds to the type pointer to A. More...
 

Detailed Description

Definition at line 236 of file FormatString.h.

Member Enumeration Documentation

Enumerator
UnknownTy 
InvalidTy 
SpecificTy 
ObjCPointerTy 
CPointerTy 
AnyCharTy 
CStrTy 
WCStrTy 
WIntTy 

Definition at line 238 of file FormatString.h.

Enumerator
NoMatch 
Match 
NoMatchPedantic 

Definition at line 241 of file FormatString.h.

Constructor & Destructor Documentation

clang::analyze_format_string::ArgType::ArgType ( Kind  k = UnknownTy,
const char *  n = nullptr 
)
inline

Definition at line 249 of file FormatString.h.

Referenced by Invalid().

clang::analyze_format_string::ArgType::ArgType ( QualType  t,
const char *  n = nullptr 
)
inline

Definition at line 251 of file FormatString.h.

clang::analyze_format_string::ArgType::ArgType ( CanQualType  t)
inline

Definition at line 253 of file FormatString.h.

Member Function Documentation

QualType ArgType::getRepresentativeType ( ASTContext C) const
std::string ArgType::getRepresentativeTypeName ( ASTContext C) const

Definition at line 482 of file FormatString.cpp.

References clang::Name, and S.

static ArgType clang::analyze_format_string::ArgType::Invalid ( )
inlinestatic
bool clang::analyze_format_string::ArgType::isValid ( ) const
inline

Definition at line 256 of file FormatString.h.

References InvalidTy.

clang::analyze_format_string::ArgType::MatchKind ArgType::matchesType ( ASTContext C,
QualType  argTy 
) const
static ArgType clang::analyze_format_string::ArgType::PtrTo ( const ArgType A)
inlinestatic

Create an ArgType which corresponds to the type pointer to A.

Definition at line 259 of file FormatString.h.

References InvalidTy.

Referenced by clang::analyze_printf::PrintfSpecifier::getArgType(), and clang::analyze_scanf::ScanfSpecifier::getArgType().


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