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 () |
| SourceRange | getSourceRange () const LLVM_READONLY |
| SourceLocation | getExprLoc () const LLVM_READONLY |
Static Public Member Functions | |
| static bool | classof (const Stmt *s) |
| static bool | classof (const ObjCIndirectCopyRestoreExpr *) |
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 1447 of file ExprObjC.h.
| clang::ObjCIndirectCopyRestoreExpr::ObjCIndirectCopyRestoreExpr | ( | Expr * | operand, |
| QualType | type, | ||
| bool | shouldCopy | ||
| ) | [inline] |
Definition at line 1463 of file ExprObjC.h.
| child_range clang::ObjCIndirectCopyRestoreExpr::children | ( | ) | [inline] |
Reimplemented from clang::Stmt.
Definition at line 1479 of file ExprObjC.h.
| static bool clang::ObjCIndirectCopyRestoreExpr::classof | ( | const Stmt * | s | ) | [inline, static] |
Reimplemented from clang::Expr.
Definition at line 1489 of file ExprObjC.h.
References clang::Stmt::getStmtClass().
| static bool clang::ObjCIndirectCopyRestoreExpr::classof | ( | const ObjCIndirectCopyRestoreExpr * | ) | [inline, static] |
Definition at line 1492 of file ExprObjC.h.
| 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 1485 of file ExprObjC.h.
| SourceRange clang::ObjCIndirectCopyRestoreExpr::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.
Definition at line 1482 of file ExprObjC.h.
| Expr* clang::ObjCIndirectCopyRestoreExpr::getSubExpr | ( | ) | [inline] |
Definition at line 1472 of file ExprObjC.h.
Referenced by emitWritebackArg().
| const Expr* clang::ObjCIndirectCopyRestoreExpr::getSubExpr | ( | ) | const [inline] |
Definition at line 1473 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 1477 of file ExprObjC.h.
References clang::Stmt::ObjCIndirectCopyRestoreExprBits.
Referenced by emitWritebackArg().
friend class ASTReader [friend] |
Definition at line 1452 of file ExprObjC.h.
friend class ASTStmtReader [friend] |
Reimplemented from clang::Stmt.
Definition at line 1453 of file ExprObjC.h.