C++: Add a comment for ReusedExpr IR translation

This commit is contained in:
Robert Marsh
2024-03-19 14:50:47 +00:00
parent 3d4f7d880d
commit 5a30ad162a

View File

@@ -2769,6 +2769,13 @@ class TranslatedTemporaryObjectExpr extends TranslatedNonConstantExpr,
final override Instruction getResult() { result = this.getTargetAddress() } final override Instruction getResult() { result = this.getTargetAddress() }
} }
/**
* IR translation of a `ReuseExpr`.
*
* This translation produces a copy of the glvalue instruction holding the (unconverted) result
* of the reused expression. In the case where the original expression was a prvalue, the
* result will be a copy of the glvalue operand of a `TranslatedLoad`.
*/
class TranslatedReuseExpr extends TranslatedNonConstantExpr { class TranslatedReuseExpr extends TranslatedNonConstantExpr {
override ReuseExpr expr; override ReuseExpr expr;