Skip to content

Commit adc557f

Browse files
committed
C++: Reformat a predicate
This allows adding a multi-line case without the auto-formatting changes becoming too disruptive.
1 parent 3827411 commit adc557f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,15 @@ predicate simpleLocalFlowStep(Node nodeFrom, Node nodeTo) {
261261
}
262262

263263
private predicate simpleInstructionLocalFlowStep(Instruction iFrom, Instruction iTo) {
264-
iTo.(CopyInstruction).getSourceValue() = iFrom or
265-
iTo.(PhiInstruction).getAnOperand().getDef() = iFrom or
264+
iTo.(CopyInstruction).getSourceValue() = iFrom
265+
or
266+
iTo.(PhiInstruction).getAnOperand().getDef() = iFrom
267+
or
266268
// Treat all conversions as flow, even conversions between different numeric types.
267-
iTo.(ConvertInstruction).getUnary() = iFrom or
268-
iTo.(InheritanceConversionInstruction).getUnary() = iFrom or
269+
iTo.(ConvertInstruction).getUnary() = iFrom
270+
or
271+
iTo.(InheritanceConversionInstruction).getUnary() = iFrom
272+
or
269273
// A chi instruction represents a point where a new value (the _partial_
270274
// operand) may overwrite an old value (the _total_ operand), but the alias
271275
// analysis couldn't determine that it surely will overwrite every bit of it or

0 commit comments

Comments
 (0)