Skip to content

Commit c5cd5f4

Browse files
author
AndreiDiaconu1
committed
Autoformat
1 parent f5b31ae commit c5cd5f4

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

csharp/ql/src/semmle/code/csharp/ir/implementation/raw/internal/TranslatedExpr.qll

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -833,17 +833,15 @@ abstract class TranslatedVariableAccess extends TranslatedNonConstantExpr {
833833

834834
class TranslatedNonFieldVariableAccess extends TranslatedVariableAccess {
835835
TranslatedNonFieldVariableAccess() {
836+
not expr instanceof FieldAccess and
837+
// If the parent expression is a `LocalVariableDeclAndInitExpr`,
838+
// then translate only the variables that are initializers (on the RHS)
839+
// and not the LHS (the address of the LHS is generated during
840+
// the translation of the initialization).
836841
(
837-
not expr instanceof FieldAccess and
838-
// If the parent expression is a `LocalVariableDeclAndInitExpr`,
839-
// then translate only the variables that are initializers (on the RHS)
840-
// and not the LHS (the address of the LHS is generated during
841-
// the translation of the initialization).
842-
(
843-
expr.getParent() instanceof LocalVariableDeclAndInitExpr
844-
implies
845-
expr = expr.getParent().(LocalVariableDeclAndInitExpr).getInitializer()
846-
)
842+
expr.getParent() instanceof LocalVariableDeclAndInitExpr
843+
implies
844+
expr = expr.getParent().(LocalVariableDeclAndInitExpr).getInitializer()
847845
)
848846
or
849847
// Static field accesses should be modeled as `TranslatedNonFieldAccess`
@@ -879,7 +877,7 @@ class TranslatedNonFieldVariableAccess extends TranslatedVariableAccess {
879877

880878
class TranslatedFieldAccess extends TranslatedVariableAccess {
881879
override FieldAccess expr;
882-
880+
883881
TranslatedFieldAccess() {
884882
// Static field accesses should be modeled as `TranslatedNonFieldAccess`
885883
not expr.getTarget().isStatic()

csharp/ql/src/semmle/code/csharp/ir/implementation/raw/internal/TranslatedFunction.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class TranslatedFunction extends TranslatedElement, TTranslatedFunction {
125125
then result = this.getBody().getFirstInstruction()
126126
else result = this.getReturnSuccessorInstruction()
127127
}
128-
128+
129129
final override predicate hasInstruction(
130130
Opcode opcode, InstructionTag tag, Type resultType, boolean isLValue
131131
) {

0 commit comments

Comments
 (0)