clang API Documentation
#include <ExprObjC.h>
Public Member Functions | |
ObjCIndirectCopyRestoreExpr (Expr *operand, QualType type, bool shouldCopy) | |
Expr * | getSubExpr () |
const Expr * | getSubExpr () const |
bool | shouldCopy () const |
child_range | children () |
SourceLocation | getLocStart () const LLVM_READONLY |
SourceLocation | getLocEnd () const LLVM_READONLY |
SourceLocation | getExprLoc () const LLVM_READONLY |
Static Public Member Functions | |
static bool | classof (const Stmt *s) |
Friends | |
class | ASTReader |
class | ASTStmtReader |
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore in ARC. This is used to support passing indirect arguments with the wrong lifetime, e.g. when passing the address of a __strong local variable to an 'out' parameter. This expression kind is only valid in an "argument" position to some sort of call expression.
The parameter must have type 'pointer to T', and the argument must have type 'pointer to U', where T and U agree except possibly in qualification. If the argument value is null, then a null pointer is passed; otherwise it points to an object A, and: 1. A temporary object B of type T is initialized, either by zero-initialization (used when initializing an 'out' parameter) or copy-initialization (used when initializing an 'inout' parameter). 2. The address of the temporary is passed to the function. 3. If the call completes normally, A is move-assigned from B. 4. Finally, A is destroyed immediately.
Currently 'T' must be a retainable object lifetime and must be __autoreleasing; this qualifier is ignored when initializing the value.
Definition at line 1472 of file ExprObjC.h.
clang::ObjCIndirectCopyRestoreExpr::ObjCIndirectCopyRestoreExpr | ( | Expr * | operand, |
QualType | type, | ||
bool | shouldCopy | ||
) | [inline] |
Definition at line 1488 of file ExprObjC.h.
child_range clang::ObjCIndirectCopyRestoreExpr::children | ( | ) | [inline] |
Reimplemented from clang::Stmt.
Definition at line 1504 of file ExprObjC.h.
static bool clang::ObjCIndirectCopyRestoreExpr::classof | ( | const Stmt * | s | ) | [inline, static] |
Reimplemented from clang::Expr.
Definition at line 1516 of file ExprObjC.h.
References clang::Stmt::getStmtClass().
SourceLocation clang::ObjCIndirectCopyRestoreExpr::getExprLoc | ( | ) | const [inline] |
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic expression.
Reimplemented from clang::Expr.
Definition at line 1512 of file ExprObjC.h.
References clang::Expr::getExprLoc(), and getSubExpr().
SourceLocation clang::ObjCIndirectCopyRestoreExpr::getLocEnd | ( | ) | const [inline] |
Reimplemented from clang::Stmt.
Definition at line 1510 of file ExprObjC.h.
References clang::Stmt::getLocEnd().
SourceLocation clang::ObjCIndirectCopyRestoreExpr::getLocStart | ( | ) | const [inline] |
Reimplemented from clang::Stmt.
Definition at line 1507 of file ExprObjC.h.
References clang::Stmt::getLocStart().
Expr* clang::ObjCIndirectCopyRestoreExpr::getSubExpr | ( | ) | [inline] |
Definition at line 1497 of file ExprObjC.h.
Referenced by emitWritebackArg(), and getExprLoc().
const Expr* clang::ObjCIndirectCopyRestoreExpr::getSubExpr | ( | ) | const [inline] |
Definition at line 1498 of file ExprObjC.h.
bool clang::ObjCIndirectCopyRestoreExpr::shouldCopy | ( | ) | const [inline] |
shouldCopy - True if we should do the 'copy' part of the copy-restore. If false, the temporary will be zero-initialized.
Definition at line 1502 of file ExprObjC.h.
References clang::Stmt::ObjCIndirectCopyRestoreExprBits.
Referenced by emitWritebackArg().
friend class ASTReader [friend] |
Definition at line 1477 of file ExprObjC.h.
friend class ASTStmtReader [friend] |
Reimplemented from clang::Stmt.
Definition at line 1478 of file ExprObjC.h.