mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Fix formatting
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user