Skip to content

Commit f32a7be

Browse files
author
Dave Bartolomeo
committed
Fix formatting
1 parent dfb687f commit f32a7be

File tree

12 files changed

+52
-31
lines changed

12 files changed

+52
-31
lines changed

cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/Operand.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,9 +484,7 @@ class PhiInputOperand extends MemoryOperand, PhiOperandBase {
484484
result = "from " + getPredecessorBlock().getDisplayIndex().toString() + ":"
485485
}
486486

487-
final override string getDumpId() {
488-
result = getPredecessorBlock().getDisplayIndex().toString()
489-
}
487+
final override string getDumpId() { result = getPredecessorBlock().getDisplayIndex().toString() }
490488

491489
/**
492490
* Gets the predecessor block from which this value comes.

cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/PrintIR.qll

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ private string getAdditionalOperandProperty(Operand operand, string key) {
6262
* operand has no properties, this predicate has no result.
6363
*/
6464
private string getOperandPropertyListString(Operand operand) {
65-
result = strictconcat(string key, string value | value = getAdditionalOperandProperty(operand, key) | key + ":" + value, ", ")
65+
result =
66+
strictconcat(string key, string value |
67+
value = getAdditionalOperandProperty(operand, key)
68+
|
69+
key + ":" + value, ", "
70+
)
6671
}
6772

6873
/**
@@ -247,7 +252,9 @@ private class PrintableInstruction extends PrintableIRNode, TPrintableInstructio
247252
concat(Operand operand |
248253
operand = instr.getAnOperand()
249254
|
250-
operand.getDumpString() + getOperandPropertyString(operand), ", " order by operand.getDumpSortOrder()
255+
operand.getDumpString() + getOperandPropertyString(operand), ", "
256+
order by
257+
operand.getDumpSortOrder()
251258
)
252259
}
253260
}

cpp/ql/src/semmle/code/cpp/ir/implementation/internal/OperandTag.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ abstract class OperandTag extends TOperandTag {
4040
/**
4141
* Gets a label that will appear before the operand when the IR is printed.
4242
*/
43-
final string getLabel() {
44-
if alwaysPrintLabel() then result = getId() + ":" else result = ""
45-
}
43+
final string getLabel() { if alwaysPrintLabel() then result = getId() + ":" else result = "" }
4644

4745
/**
4846
* Gets an identifier that uniquely identifies this operand within its instruction.

cpp/ql/src/semmle/code/cpp/ir/implementation/raw/Operand.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,9 +484,7 @@ class PhiInputOperand extends MemoryOperand, PhiOperandBase {
484484
result = "from " + getPredecessorBlock().getDisplayIndex().toString() + ":"
485485
}
486486

487-
final override string getDumpId() {
488-
result = getPredecessorBlock().getDisplayIndex().toString()
489-
}
487+
final override string getDumpId() { result = getPredecessorBlock().getDisplayIndex().toString() }
490488

491489
/**
492490
* Gets the predecessor block from which this value comes.

cpp/ql/src/semmle/code/cpp/ir/implementation/raw/PrintIR.qll

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ private string getAdditionalOperandProperty(Operand operand, string key) {
6262
* operand has no properties, this predicate has no result.
6363
*/
6464
private string getOperandPropertyListString(Operand operand) {
65-
result = strictconcat(string key, string value | value = getAdditionalOperandProperty(operand, key) | key + ":" + value, ", ")
65+
result =
66+
strictconcat(string key, string value |
67+
value = getAdditionalOperandProperty(operand, key)
68+
|
69+
key + ":" + value, ", "
70+
)
6671
}
6772

6873
/**
@@ -247,7 +252,9 @@ private class PrintableInstruction extends PrintableIRNode, TPrintableInstructio
247252
concat(Operand operand |
248253
operand = instr.getAnOperand()
249254
|
250-
operand.getDumpString() + getOperandPropertyString(operand), ", " order by operand.getDumpSortOrder()
255+
operand.getDumpString() + getOperandPropertyString(operand), ", "
256+
order by
257+
operand.getDumpSortOrder()
251258
)
252259
}
253260
}

cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/Operand.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,9 +484,7 @@ class PhiInputOperand extends MemoryOperand, PhiOperandBase {
484484
result = "from " + getPredecessorBlock().getDisplayIndex().toString() + ":"
485485
}
486486

487-
final override string getDumpId() {
488-
result = getPredecessorBlock().getDisplayIndex().toString()
489-
}
487+
final override string getDumpId() { result = getPredecessorBlock().getDisplayIndex().toString() }
490488

491489
/**
492490
* Gets the predecessor block from which this value comes.

cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/PrintIR.qll

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ private string getAdditionalOperandProperty(Operand operand, string key) {
6262
* operand has no properties, this predicate has no result.
6363
*/
6464
private string getOperandPropertyListString(Operand operand) {
65-
result = strictconcat(string key, string value | value = getAdditionalOperandProperty(operand, key) | key + ":" + value, ", ")
65+
result =
66+
strictconcat(string key, string value |
67+
value = getAdditionalOperandProperty(operand, key)
68+
|
69+
key + ":" + value, ", "
70+
)
6671
}
6772

6873
/**
@@ -247,7 +252,9 @@ private class PrintableInstruction extends PrintableIRNode, TPrintableInstructio
247252
concat(Operand operand |
248253
operand = instr.getAnOperand()
249254
|
250-
operand.getDumpString() + getOperandPropertyString(operand), ", " order by operand.getDumpSortOrder()
255+
operand.getDumpString() + getOperandPropertyString(operand), ", "
256+
order by
257+
operand.getDumpSortOrder()
251258
)
252259
}
253260
}

csharp/ql/src/experimental/ir/implementation/internal/OperandTag.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ abstract class OperandTag extends TOperandTag {
4040
/**
4141
* Gets a label that will appear before the operand when the IR is printed.
4242
*/
43-
final string getLabel() {
44-
if alwaysPrintLabel() then result = getId() + ":" else result = ""
45-
}
43+
final string getLabel() { if alwaysPrintLabel() then result = getId() + ":" else result = "" }
4644

4745
/**
4846
* Gets an identifier that uniquely identifies this operand within its instruction.

csharp/ql/src/experimental/ir/implementation/raw/Operand.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,9 +484,7 @@ class PhiInputOperand extends MemoryOperand, PhiOperandBase {
484484
result = "from " + getPredecessorBlock().getDisplayIndex().toString() + ":"
485485
}
486486

487-
final override string getDumpId() {
488-
result = getPredecessorBlock().getDisplayIndex().toString()
489-
}
487+
final override string getDumpId() { result = getPredecessorBlock().getDisplayIndex().toString() }
490488

491489
/**
492490
* Gets the predecessor block from which this value comes.

csharp/ql/src/experimental/ir/implementation/raw/PrintIR.qll

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ private string getAdditionalOperandProperty(Operand operand, string key) {
6262
* operand has no properties, this predicate has no result.
6363
*/
6464
private string getOperandPropertyListString(Operand operand) {
65-
result = strictconcat(string key, string value | value = getAdditionalOperandProperty(operand, key) | key + ":" + value, ", ")
65+
result =
66+
strictconcat(string key, string value |
67+
value = getAdditionalOperandProperty(operand, key)
68+
|
69+
key + ":" + value, ", "
70+
)
6671
}
6772

6873
/**
@@ -247,7 +252,9 @@ private class PrintableInstruction extends PrintableIRNode, TPrintableInstructio
247252
concat(Operand operand |
248253
operand = instr.getAnOperand()
249254
|
250-
operand.getDumpString() + getOperandPropertyString(operand), ", " order by operand.getDumpSortOrder()
255+
operand.getDumpString() + getOperandPropertyString(operand), ", "
256+
order by
257+
operand.getDumpSortOrder()
251258
)
252259
}
253260
}

0 commit comments

Comments
 (0)