Class TranslatedCoExpr
IR translation of a co_await
or co_yield
expression.
The translation of x = co_await ...
is essentially:
if (!awaiter.await_ready()) {
awaiter.await_suspend();
}
x = awaiter.await_resume();
where awaiter
is an object constructed from programmer-supplied
input, and for IR construction purposes these are resolved by the C/C++
front-end.
See https://en.cppreference.com/w/cpp/language/coroutines#co_await for the
specification on how awaiter
is obtained.
Import path
import semmle.code.cpp.ir.implementation.raw.internal.TranslatedExpr
Direct supertypes
Indirect supertypes
Known direct subtypes
Inherited fields
expr | from TranslatedExpr |
Predicates
getALastInstructionInternal | Gets an instruction within this |
getAwaitReady | Gets the expression that decides if the enclosing coroutine should be suspended. |
getAwaitResume | Gets the expression that represents the resume point if the enclosing coroutine was suspended. |
getAwaitSuspend | Gets the expression that is evaluated when the enclosing coroutine is suspended. |
getChildInternal | Gets the immediate child element of this element. The |
getChildSuccessorInternal | Gets the successor instruction to which control should flow after the child element specified by |
getFirstInstruction | Get the first instruction to be executed in the evaluation of this element when the edge kind is |
getInstructionRegisterOperand | Gets the instruction whose result is consumed as an operand of the instruction specified by |
getInstructionSuccessorInternal | Gets the successor instruction of the instruction that was generated by this element for tag |
getOperand | Gets the operand of this operation. |
getResult | Gets the instruction that produces the result of the expression. |
hasInstruction | Holds if this element generates an instruction with opcode |
Inherited predicates
getAChild | Get the immediate child elements of this element. | from TranslatedElement |
getALastInstruction | Gets an instruction within this | from TranslatedElement |
getAST | DEPRECATED: Alias for getAst | from TranslatedElement |
getAst | Gets the AST node being translated. | from TranslatedExpr |
getChild | Gets the immediate child element of this element. The | from TranslatedExpr |
getChildSuccessor | Gets the successor instruction to which control should flow after the child element specified by | from TranslatedElement |
getEnclosingFunction | Gets the | from TranslatedExpr |
getExceptionSuccessorInstruction | Gets the instruction to which control should flow if an exception is thrown within this element. This will generally return first | from TranslatedElement |
getExpr | Gets the expression from which this | from TranslatedExpr |
getFirstDestructorCallIndex | Gets the child index of the first destructor call that should be executed after this | from TranslatedExpr |
getFunction | Gets the | from TranslatedExpr |
getId | Gets the an identifier string for the element. This id is unique within the scope of the element’s function. | from TranslatedElement |
getInstruction | Gets the instruction generated by this element with tag | from TranslatedElement |
getInstructionBuiltInOperation | If the instruction specified by | from TranslatedElement |
getInstructionConstantValue | If the instruction specified by | from TranslatedElement |
getInstructionElementSize | If the instruction specified by | from TranslatedElement |
getInstructionExceptionType | If the instruction specified by | from TranslatedElement |
getInstructionField | If the instruction specified by | from TranslatedElement |
getInstructionFunction | If the instruction specified by | from TranslatedElement |
getInstructionIndex | If the instruction specified by | from TranslatedElement |
getInstructionInheritance | If the instruction specified by | from TranslatedElement |
getInstructionMemoryOperandType | Gets the type of the memory operand specified by | from TranslatedElement |
getInstructionOperandSize | Gets the size of the memory operand specified by | from TranslatedElement |
getInstructionStringLiteral | If the instruction specified by | from TranslatedElement |
getInstructionSuccessor | Gets the successor instruction of the instruction that was generated by this element for tag | from TranslatedElement |
getInstructionVariable | If the instruction specified by | from TranslatedElement |
getLastChild | from TranslatedElement | |
getLocation | Gets the location of this element. | from TranslatedElement |
getParent | Gets the parent element of this element. | from TranslatedElement |
getPrimaryInstructionForSideEffect | Gets the primary instruction for the side effect instruction that was generated by this element for tag | from TranslatedElement |
getResultType | from TranslatedExpr | |
getTempVariable | Gets the temporary variable generated by this element with tag | from TranslatedElement |
handlesDestructorsExplicitly | Holds if this | from TranslatedElement |
hasAnImplicitDestructorCall | Holds if this element has implicit destructor calls that should follow it. | from TranslatedExpr |
hasTempVariable | Holds if this element generates a temporary variable with type | from TranslatedElement |
isResultGLValue | Holds if the result of this | from TranslatedCoreExpr |
needsUnknownOpaqueType | Holds if the generated IR refers to an opaque type with size | from TranslatedElement |
producesExprResult | Holds if this | from TranslatedCoreExpr |
toString | from TranslatedCoreExpr |