Skip to content

Commit bd78f68

Browse files
author
Dave Bartolomeo
committed
C++/C#: Fix formatting
1 parent df21835 commit bd78f68

File tree

14 files changed

+58
-45
lines changed

14 files changed

+58
-45
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ class IRAutomaticVariable extends IRVariable {
112112
exists(Language::Variable var |
113113
this = TIRUserVariable(var, _, func) and
114114
Language::isVariableAutomatic(var)
115-
) or
115+
)
116+
or
116117
this = TIRTempVariable(func, _, _, _)
117118
}
118119
}

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,18 @@ module InstructionSanity {
9494
/**
9595
* Holds if instruction `instr` has multiple operands with tag `tag`.
9696
*/
97-
query predicate duplicateOperand(Instruction instr, string message, IRFunction func,
98-
string funcText) {
97+
query predicate duplicateOperand(
98+
Instruction instr, string message, IRFunction func, string funcText
99+
) {
99100
exists(OperandTag tag, int operandCount |
100101
operandCount = strictcount(NonPhiOperand operand |
101-
operand = instr.getAnOperand() and
102-
operand.getOperandTag() = tag
103-
) and
102+
operand = instr.getAnOperand() and
103+
operand.getOperandTag() = tag
104+
) and
104105
operandCount > 1 and
105106
not tag instanceof UnmodeledUseOperandTag and
106107
message = "Instruction has " + operandCount + " operands with tag '" + tag.toString() + "'" +
107-
" in function '$@'." and
108+
" in function '$@'." and
108109
func = instr.getEnclosingIRFunction() and
109110
funcText = Language::getIdentityString(func.getFunction())
110111
)

cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -867,8 +867,9 @@ private module CachedForDebugging {
867867
}
868868

869869
module SSASanity {
870-
query predicate multipleOperandMemoryLocations(OldIR::MemoryOperand operand, string message,
871-
OldIR::IRFunction func, string funcText) {
870+
query predicate multipleOperandMemoryLocations(
871+
OldIR::MemoryOperand operand, string message, OldIR::IRFunction func, string funcText
872+
) {
872873
exists(int locationCount |
873874
locationCount = strictcount(Alias::getOperandMemoryLocation(operand)) and
874875
locationCount > 1 and
@@ -877,4 +878,4 @@ module SSASanity {
877878
message = "Operand has " + locationCount.toString() + " memory accesses in function '$@'."
878879
)
879880
}
880-
}
881+
}

cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSASanity.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @name Aliased SSA Sanity Check
3-
* @description Performs sanity checks on the SSA construction. This query should have no results.
3+
* @description Performs sanity checks on the SSA construction. This query should have no results.
44
* @kind table
55
* @id cpp/aliased-ssa-sanity-check
66
*/

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ class IRAutomaticVariable extends IRVariable {
112112
exists(Language::Variable var |
113113
this = TIRUserVariable(var, _, func) and
114114
Language::isVariableAutomatic(var)
115-
) or
115+
)
116+
or
116117
this = TIRTempVariable(func, _, _, _)
117118
}
118119
}

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,18 @@ module InstructionSanity {
9494
/**
9595
* Holds if instruction `instr` has multiple operands with tag `tag`.
9696
*/
97-
query predicate duplicateOperand(Instruction instr, string message, IRFunction func,
98-
string funcText) {
97+
query predicate duplicateOperand(
98+
Instruction instr, string message, IRFunction func, string funcText
99+
) {
99100
exists(OperandTag tag, int operandCount |
100101
operandCount = strictcount(NonPhiOperand operand |
101-
operand = instr.getAnOperand() and
102-
operand.getOperandTag() = tag
103-
) and
102+
operand = instr.getAnOperand() and
103+
operand.getOperandTag() = tag
104+
) and
104105
operandCount > 1 and
105106
not tag instanceof UnmodeledUseOperandTag and
106107
message = "Instruction has " + operandCount + " operands with tag '" + tag.toString() + "'" +
107-
" in function '$@'." and
108+
" in function '$@'." and
108109
func = instr.getEnclosingIRFunction() and
109110
funcText = Language::getIdentityString(func.getFunction())
110111
)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ class IRAutomaticVariable extends IRVariable {
112112
exists(Language::Variable var |
113113
this = TIRUserVariable(var, _, func) and
114114
Language::isVariableAutomatic(var)
115-
) or
115+
)
116+
or
116117
this = TIRTempVariable(func, _, _, _)
117118
}
118119
}

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,18 @@ module InstructionSanity {
9494
/**
9595
* Holds if instruction `instr` has multiple operands with tag `tag`.
9696
*/
97-
query predicate duplicateOperand(Instruction instr, string message, IRFunction func,
98-
string funcText) {
97+
query predicate duplicateOperand(
98+
Instruction instr, string message, IRFunction func, string funcText
99+
) {
99100
exists(OperandTag tag, int operandCount |
100101
operandCount = strictcount(NonPhiOperand operand |
101-
operand = instr.getAnOperand() and
102-
operand.getOperandTag() = tag
103-
) and
102+
operand = instr.getAnOperand() and
103+
operand.getOperandTag() = tag
104+
) and
104105
operandCount > 1 and
105106
not tag instanceof UnmodeledUseOperandTag and
106107
message = "Instruction has " + operandCount + " operands with tag '" + tag.toString() + "'" +
107-
" in function '$@'." and
108+
" in function '$@'." and
108109
func = instr.getEnclosingIRFunction() and
109110
funcText = Language::getIdentityString(func.getFunction())
110111
)

cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -867,8 +867,9 @@ private module CachedForDebugging {
867867
}
868868

869869
module SSASanity {
870-
query predicate multipleOperandMemoryLocations(OldIR::MemoryOperand operand, string message,
871-
OldIR::IRFunction func, string funcText) {
870+
query predicate multipleOperandMemoryLocations(
871+
OldIR::MemoryOperand operand, string message, OldIR::IRFunction func, string funcText
872+
) {
872873
exists(int locationCount |
873874
locationCount = strictcount(Alias::getOperandMemoryLocation(operand)) and
874875
locationCount > 1 and
@@ -877,4 +878,4 @@ module SSASanity {
877878
message = "Operand has " + locationCount.toString() + " memory accesses in function '$@'."
878879
)
879880
}
880-
}
881+
}

csharp/ql/src/semmle/code/csharp/ir/implementation/raw/IRVariable.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ class IRAutomaticVariable extends IRVariable {
112112
exists(Language::Variable var |
113113
this = TIRUserVariable(var, _, func) and
114114
Language::isVariableAutomatic(var)
115-
) or
115+
)
116+
or
116117
this = TIRTempVariable(func, _, _, _)
117118
}
118119
}

0 commit comments

Comments
 (0)