clang
3.7.0
|
#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... | |
Definition at line 231 of file FormatString.h.
Enumerator | |
---|---|
UnknownTy | |
InvalidTy | |
SpecificTy | |
ObjCPointerTy | |
CPointerTy | |
AnyCharTy | |
CStrTy | |
WCStrTy | |
WIntTy |
Definition at line 233 of file FormatString.h.
Enumerator | |
---|---|
NoMatch | |
Match | |
NoMatchPedantic |
Definition at line 236 of file FormatString.h.
|
inline |
Definition at line 244 of file FormatString.h.
Referenced by Invalid().
|
inline |
Definition at line 246 of file FormatString.h.
|
inline |
Definition at line 248 of file FormatString.h.
QualType ArgType::getRepresentativeType | ( | ASTContext & | C | ) | const |
Definition at line 415 of file FormatString.cpp.
References clang::ASTContext::CharTy, clang::ASTContext::getPointerType(), clang::ASTContext::getWideCharType(), clang::ASTContext::getWIntType(), clang::ASTContext::ObjCBuiltinIdTy, and clang::ASTContext::VoidPtrTy.
std::string ArgType::getRepresentativeTypeName | ( | ASTContext & | C | ) | const |
Definition at line 451 of file FormatString.cpp.
References S.
|
inlinestatic |
Definition at line 250 of file FormatString.h.
References ArgType(), and InvalidTy.
Referenced by clang::analyze_printf::PrintfSpecifier::getArgType().
|
inline |
Definition at line 251 of file FormatString.h.
References InvalidTy.
clang::analyze_format_string::ArgType::MatchKind ArgType::matchesType | ( | ASTContext & | C, |
QualType | argTy | ||
) | const |
Definition at line 260 of file FormatString.cpp.
References clang::Type::getAs(), clang::Type::getAsStructureType(), clang::ASTContext::getCanonicalType(), clang::ASTContext::getCorrespondingUnsignedType(), clang::Type::getPointeeType(), clang::PointerType::getPointeeType(), clang::ASTContext::getPromotedIntegerType(), clang::CanQual< T >::getUnqualifiedType(), clang::ASTContext::getWideCharType(), clang::ASTContext::getWIntType(), clang::Type::hasSignedIntegerRepresentation(), clang::ASTContext::IntTy, clang::Type::isBlockPointerType(), clang::QualType::isConstQualified(), clang::Type::isNullPtrType(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::Type::isPromotableIntegerType(), clang::Type::isVoidPointerType(), clang::Type::isVoidType(), clang::ASTContext::LongLongTy, clang::ASTContext::LongTy, clang::ASTContext::ShortTy, clang::ASTContext::SignedCharTy, clang::ASTContext::UnsignedCharTy, clang::ASTContext::UnsignedIntTy, clang::ASTContext::UnsignedLongLongTy, clang::ASTContext::UnsignedLongTy, and clang::ASTContext::UnsignedShortTy.
Create an ArgType which corresponds to the type pointer to A.
Definition at line 254 of file FormatString.h.
References InvalidTy.
Referenced by clang::analyze_printf::PrintfSpecifier::getArgType().