clang API Documentation
#include <ExprCXX.h>
Public Member Functions | |
CXXUuidofExpr (QualType Ty, TypeSourceInfo *Operand, SourceRange R) | |
CXXUuidofExpr (QualType Ty, Expr *Operand, SourceRange R) | |
CXXUuidofExpr (EmptyShell Empty, bool isExpr) | |
bool | isTypeOperand () const |
QualType | getTypeOperand (ASTContext &Context) const |
Retrieves the type operand of this __uuidof() expression after various required adjustments (removing reference types, cv-qualifiers). | |
TypeSourceInfo * | getTypeOperandSourceInfo () const |
Retrieve source information for the type operand. | |
void | setTypeOperandSourceInfo (TypeSourceInfo *TSI) |
Expr * | getExprOperand () const |
void | setExprOperand (Expr *E) |
StringRef | getUuidAsStringRef (ASTContext &Context) const |
SourceLocation | getLocStart () const LLVM_READONLY |
SourceLocation | getLocEnd () const LLVM_READONLY |
SourceRange | getSourceRange () const LLVM_READONLY |
void | setSourceRange (SourceRange R) |
child_range | children () |
Static Public Member Functions | |
static bool | classof (const Stmt *T) |
static const UuidAttr * | GetUuidAttrOfType (QualType QT, bool *HasMultipleGUIDsPtr=nullptr) |
A Microsoft C++ __uuidof
expression, which gets the _GUID that corresponds to the supplied type or expression.
This represents code like __uuidof(COMTYPE)
or __uuidof(*comPtr)
clang::CXXUuidofExpr::CXXUuidofExpr | ( | QualType | Ty, |
TypeSourceInfo * | Operand, | ||
SourceRange | R | ||
) | [inline] |
clang::CXXUuidofExpr::CXXUuidofExpr | ( | QualType | Ty, |
Expr * | Operand, | ||
SourceRange | R | ||
) | [inline] |
clang::CXXUuidofExpr::CXXUuidofExpr | ( | EmptyShell | Empty, |
bool | isExpr | ||
) | [inline] |
child_range clang::CXXUuidofExpr::children | ( | ) | [inline] |
Reimplemented from clang::Stmt.
Definition at line 744 of file ExprCXX.h.
References isTypeOperand().
static bool clang::CXXUuidofExpr::classof | ( | const Stmt * | T | ) | [inline, static] |
Reimplemented from clang::Expr.
Definition at line 734 of file ExprCXX.h.
References clang::Stmt::getStmtClass().
Expr* clang::CXXUuidofExpr::getExprOperand | ( | ) | const [inline] |
Definition at line 717 of file ExprCXX.h.
References isTypeOperand().
Referenced by getUuidAsStringRef().
SourceLocation clang::CXXUuidofExpr::getLocEnd | ( | ) | const [inline] |
Reimplemented from clang::Stmt.
Definition at line 730 of file ExprCXX.h.
References clang::SourceRange::getEnd().
SourceLocation clang::CXXUuidofExpr::getLocStart | ( | ) | const [inline] |
Reimplemented from clang::Stmt.
Definition at line 729 of file ExprCXX.h.
References clang::SourceRange::getBegin().
SourceRange clang::CXXUuidofExpr::getSourceRange | ( | ) | const [inline] |
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpreted by SourceManager. We assume AST clients will have a pointer to the respective SourceManager.
Reimplemented from clang::Stmt.
QualType CXXUuidofExpr::getTypeOperand | ( | ASTContext & | Context | ) | const |
Retrieves the type operand of this __uuidof() expression after various required adjustments (removing reference types, cv-qualifiers).
Definition at line 50 of file ExprCXX.cpp.
References clang::QualType::getNonReferenceType(), clang::TypeSourceInfo::getType(), clang::ASTContext::getUnqualifiedArrayType(), and isTypeOperand().
Referenced by getUuidAsStringRef().
TypeSourceInfo* clang::CXXUuidofExpr::getTypeOperandSourceInfo | ( | ) | const [inline] |
Retrieve source information for the type operand.
Definition at line 707 of file ExprCXX.h.
References isTypeOperand().
StringRef CXXUuidofExpr::getUuidAsStringRef | ( | ASTContext & | Context | ) | const |
Definition at line 115 of file ExprCXX.cpp.
References getExprOperand(), clang::Expr::getType(), getTypeOperand(), GetUuidAttrOfType(), clang::Expr::isNullPointerConstant(), isTypeOperand(), and clang::Expr::NPC_ValueDependentIsNull.
Referenced by clang::CodeGen::CodeGenModule::GetAddrOfUuidDescriptor().
const UuidAttr * CXXUuidofExpr::GetUuidAttrOfType | ( | QualType | QT, |
bool * | HasMultipleGUIDsPtr = nullptr |
||
) | [static] |
Grabs __declspec(uuid()) off a type, or returns 0 if we cannot resolve to a single GUID.
Definition at line 58 of file ExprCXX.cpp.
References clang::TemplateArgumentList::asArray(), clang::TemplateArgument::Declaration, clang::Type::getAsCXXRecordDecl(), clang::Decl::getAttr(), clang::Type::getBaseElementTypeUnsafe(), clang::CXXRecordDecl::getMostRecentDecl(), clang::Type::getPointeeType(), clang::QualType::getTypePtr(), clang::Type::isArrayType(), clang::Type::isPointerType(), clang::Type::isReferenceType(), and clang::TemplateArgument::Type.
Referenced by clang::Sema::BuildCXXUuidof(), and getUuidAsStringRef().
bool clang::CXXUuidofExpr::isTypeOperand | ( | ) | const [inline] |
Definition at line 700 of file ExprCXX.h.
Referenced by children(), getExprOperand(), getTypeOperand(), getTypeOperandSourceInfo(), getUuidAsStringRef(), setExprOperand(), and setTypeOperandSourceInfo().
void clang::CXXUuidofExpr::setExprOperand | ( | Expr * | E | ) | [inline] |
Definition at line 722 of file ExprCXX.h.
References isTypeOperand().
void clang::CXXUuidofExpr::setSourceRange | ( | SourceRange | R | ) | [inline] |
void clang::CXXUuidofExpr::setTypeOperandSourceInfo | ( | TypeSourceInfo * | TSI | ) | [inline] |
Definition at line 712 of file ExprCXX.h.
References isTypeOperand().