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

#include "clang/Analysis/Analyses/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 249 of file FormatString.h.

Member Enumeration Documentation

◆ Kind

Enumerator
UnknownTy 
InvalidTy 
SpecificTy 
ObjCPointerTy 
CPointerTy 
AnyCharTy 
CStrTy 
WCStrTy 
WIntTy 

Definition at line 251 of file FormatString.h.

◆ MatchKind

Enumerator
NoMatch 
Match 
NoMatchPedantic 

Definition at line 254 of file FormatString.h.

Constructor & Destructor Documentation

◆ ArgType() [1/3]

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

Definition at line 262 of file FormatString.h.

◆ ArgType() [2/3]

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

Definition at line 264 of file FormatString.h.

◆ ArgType() [3/3]

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

Definition at line 266 of file FormatString.h.

Member Function Documentation

◆ getRepresentativeType()

QualType ArgType::getRepresentativeType ( ASTContext C) const

◆ getRepresentativeTypeName()

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

Definition at line 494 of file FormatString.cpp.

◆ Invalid()

static ArgType clang::analyze_format_string::ArgType::Invalid ( )
inlinestatic

◆ isValid()

bool clang::analyze_format_string::ArgType::isValid ( ) const
inline

◆ matchesType()

clang::analyze_format_string::ArgType::MatchKind ArgType::matchesType ( ASTContext C,
QualType  argTy 
) const

◆ PtrTo()

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 272 of file FormatString.h.

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


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