Fix formatting

This commit is contained in:
Dave Bartolomeo
2020-10-18 11:08:42 -04:00
parent 0b2acff837
commit 2f34c78552
2 changed files with 9 additions and 7 deletions

View File

@@ -256,7 +256,8 @@ private predicate ignoreLoad(Expr expr) {
private predicate needsLoadForParentExpr(Expr expr) {
exists(CrementOperation crement | expr = crement.getOperand().getFullyConverted())
or
exists(AssignOperation ao | expr = ao.getLValue().getFullyConverted()) or
exists(AssignOperation ao | expr = ao.getLValue().getFullyConverted())
or
// For arguments that are passed by value but require a constructor call, the extractor emits a
// `TemporaryObjectExpr` as the argument, and marks it as a glvalue. This is roughly how a code-
// generating compiler would implement this, passing the address of the temporary so that the

View File

@@ -2051,11 +2051,12 @@ class TranslatedBinaryConditionalExpr extends TranslatedConditionalExpr {
/**
* IR translation of the materialization of a temporary object.
*
*
* This translation allocates a temporary variable, and initializes it treating `expr.getExpr()` as
* its initializer.
*/
class TranslatedTemporaryObjectExpr extends TranslatedNonConstantExpr, TranslatedVariableInitialization {
class TranslatedTemporaryObjectExpr extends TranslatedNonConstantExpr,
TranslatedVariableInitialization {
override TemporaryObjectExpr expr;
final override predicate hasTempVariable(TempVariableTag tag, CppType type) {
@@ -2069,15 +2070,15 @@ class TranslatedTemporaryObjectExpr extends TranslatedNonConstantExpr, Translate
result = getTranslatedInitialization(expr.getExpr())
}
final override IRVariable getIRVariable() { result = getIRTempVariable(expr, TempObjectTempVar()) }
final override IRVariable getIRVariable() {
result = getIRTempVariable(expr, TempObjectTempVar())
}
final override Instruction getInitializationSuccessor() {
result = getParent().getChildSuccessor(this)
}
final override Instruction getResult() {
result = getTargetAddress()
}
final override Instruction getResult() { result = getTargetAddress() }
}
/**