Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b60e7c2

Browse files
author
Robert Marsh
committed
C++: autoformat and accept test output
1 parent 057c634 commit b60e7c2

8 files changed

Lines changed: 13 additions & 19 deletions

File tree

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ module InstructionSanity {
120120
)
121121
}
122122

123-
query predicate duplicateChiOperand(ChiInstruction chi) {
124-
chi.getTotal() = chi.getPartial()
125-
}
123+
query predicate duplicateChiOperand(ChiInstruction chi) { chi.getTotal() = chi.getPartial() }
126124

127125
/**
128126
* Holds if an instruction, other than `ExitFunction`, has no successors.

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ module InstructionSanity {
120120
)
121121
}
122122

123-
query predicate duplicateChiOperand(ChiInstruction chi) {
124-
chi.getTotal() = chi.getPartial()
125-
}
123+
query predicate duplicateChiOperand(ChiInstruction chi) { chi.getTotal() = chi.getPartial() }
126124

127125
/**
128126
* Holds if an instruction, other than `ExitFunction`, has no successors.

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ module InstructionSanity {
120120
)
121121
}
122122

123-
query predicate duplicateChiOperand(ChiInstruction chi) {
124-
chi.getTotal() = chi.getPartial()
125-
}
123+
query predicate duplicateChiOperand(ChiInstruction chi) { chi.getTotal() = chi.getPartial() }
126124

127125
/**
128126
* Holds if an instruction, other than `ExitFunction`, has no successors.

cpp/ql/test/library-tests/syntax-zoo/aliased_ssa_sanity.expected

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,20 @@ missingOperand
2828
| ir.cpp:823:7:823:13 | IndirectMayWriteSideEffect: call to Base | Instruction 'IndirectMayWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
2929
| ir.cpp:824:7:824:26 | IndirectMayWriteSideEffect: call to Base | Instruction 'IndirectMayWriteSideEffect' is missing an expected operand with tag 'Address' in function '$@'. | ir.cpp:799:6:799:25 | IR: HierarchyConversions | void HierarchyConversions() |
3030
| misc.c:125:5:125:11 | CopyValue: (statement expression) | Instruction 'CopyValue' is missing an expected operand with tag 'Unary' in function '$@'. | misc.c:97:6:97:10 | IR: misc3 | void misc3() |
31+
| try_catch.cpp:13:5:13:16 | Chi: call to exn1 | Instruction 'Chi' is missing an expected operand with tag 'ChiTotal' in function '$@'. | try_catch.cpp:11:6:11:17 | IR: bypass_catch | void bypass_catch() |
3132
unexpectedOperand
3233
duplicateOperand
3334
missingPhiOperand
3435
| cpp11.cpp:141:7:141:7 | Phi: g | cpp11.cpp:161:16:161:16 | NoOp: label ...: |
3536
missingOperandType
37+
duplicateChiOperand
3638
instructionWithoutSuccessor
3739
| VacuousDestructorCall.cpp:2:29:2:29 | InitializeParameter: y |
3840
| assume0.cpp:7:2:7:2 | Chi: call to f |
39-
| condition_decls.cpp:16:19:16:20 | IndirectMayWriteSideEffect: call to BoxedInt |
40-
| condition_decls.cpp:26:23:26:24 | IndirectMayWriteSideEffect: call to BoxedInt |
41-
| condition_decls.cpp:41:22:41:23 | IndirectMayWriteSideEffect: call to BoxedInt |
42-
| condition_decls.cpp:48:52:48:53 | IndirectMayWriteSideEffect: call to BoxedInt |
41+
| condition_decls.cpp:16:19:16:20 | Chi: call to BoxedInt |
42+
| condition_decls.cpp:26:23:26:24 | Chi: call to BoxedInt |
43+
| condition_decls.cpp:41:22:41:23 | Chi: call to BoxedInt |
44+
| condition_decls.cpp:48:52:48:53 | Chi: call to BoxedInt |
4345
| cpp17.cpp:15:11:15:21 | Convert: (void *)... |
4446
| misc.c:171:10:171:13 | Uninitialized: definition of str2 |
4547
| misc.c:219:47:219:48 | InitializeParameter: sp |

cpp/ql/test/library-tests/syntax-zoo/raw_sanity.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ unexpectedOperand
4848
duplicateOperand
4949
missingPhiOperand
5050
missingOperandType
51+
duplicateChiOperand
5152
instructionWithoutSuccessor
5253
| VacuousDestructorCall.cpp:2:29:2:29 | InitializeParameter: y |
5354
| VacuousDestructorCall.cpp:3:3:3:3 | VariableAddress: x |

cpp/ql/test/library-tests/syntax-zoo/unaliased_ssa_sanity.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ missingPhiOperand
4242
| range_analysis.c:389:3:389:32 | Phi: return ... | range_analysis.c:387:38:387:38 | Constant: 5 |
4343
| range_analysis.c:389:3:389:32 | Phi: return ... | range_analysis.c:387:38:387:38 | Constant: 5 |
4444
missingOperandType
45+
duplicateChiOperand
4546
instructionWithoutSuccessor
4647
| VacuousDestructorCall.cpp:2:29:2:29 | InitializeParameter: y |
4748
| assume0.cpp:7:2:7:2 | CallSideEffect: call to f |

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ module InstructionSanity {
120120
)
121121
}
122122

123-
query predicate duplicateChiOperand(ChiInstruction chi) {
124-
chi.getTotal() = chi.getPartial()
125-
}
123+
query predicate duplicateChiOperand(ChiInstruction chi) { chi.getTotal() = chi.getPartial() }
126124

127125
/**
128126
* Holds if an instruction, other than `ExitFunction`, has no successors.

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ module InstructionSanity {
120120
)
121121
}
122122

123-
query predicate duplicateChiOperand(ChiInstruction chi) {
124-
chi.getTotal() = chi.getPartial()
125-
}
123+
query predicate duplicateChiOperand(ChiInstruction chi) { chi.getTotal() = chi.getPartial() }
126124

127125
/**
128126
* Holds if an instruction, other than `ExitFunction`, has no successors.

0 commit comments

Comments
 (0)