Skip to content

Commit 5406783

Browse files
committed
C++: autoformat
1 parent 230f4bc commit 5406783

File tree

6 files changed

+36
-21
lines changed

6 files changed

+36
-21
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ predicate allocationEscapes(Configuration::Allocation allocation) {
329329
config.useSoundEscapeAnalysis() and resultEscapesNonReturn(allocation.getABaseInstruction())
330330
)
331331
or
332-
Configuration::phaseNeedsSoundEscapeAnalysis() and resultEscapesNonReturn(allocation.getABaseInstruction())
332+
Configuration::phaseNeedsSoundEscapeAnalysis() and
333+
resultEscapesNonReturn(allocation.getABaseInstruction())
333334
}
334335

335336
/**

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ private module Cached {
6565
instr = reusedPhiInstruction(_) and
6666
// Check that the phi instruction is *not* degenerate, but we can't use
6767
// getDegeneratePhiOperand in the first stage with phi instyructions
68-
exists(OldIR::PhiInputOperand operand1, OldIR::PhiInputOperand operand2, OldInstruction oldInstruction |
68+
exists(
69+
OldIR::PhiInputOperand operand1, OldIR::PhiInputOperand operand2,
70+
OldInstruction oldInstruction
71+
|
6972
oldInstruction = instr and
7073
operand1 = oldInstruction.(OldIR::PhiInstruction).getAnInputOperand() and
7174
operand1.getPredecessorBlock() instanceof OldBlock and
@@ -79,13 +82,14 @@ private module Cached {
7982
instr instanceof TUnreachedInstruction
8083
}
8184

82-
cached IRBlock getNewBlock(OldBlock oldBlock) {
85+
cached
86+
IRBlock getNewBlock(OldBlock oldBlock) {
8387
exists(Instruction newEnd, OldIR::Instruction oldEnd |
8488
(
85-
result.getLastInstruction() = newEnd and
86-
not newEnd instanceof ChiInstruction
87-
or
88-
newEnd = result.getLastInstruction().(ChiInstruction).getAPredecessor() // does this work?
89+
result.getLastInstruction() = newEnd and
90+
not newEnd instanceof ChiInstruction
91+
or
92+
newEnd = result.getLastInstruction().(ChiInstruction).getAPredecessor() // does this work?
8993
) and
9094
(
9195
oldBlock.getLastInstruction() = oldEnd and

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ predicate allocationEscapes(Configuration::Allocation allocation) {
329329
config.useSoundEscapeAnalysis() and resultEscapesNonReturn(allocation.getABaseInstruction())
330330
)
331331
or
332-
Configuration::phaseNeedsSoundEscapeAnalysis() and resultEscapesNonReturn(allocation.getABaseInstruction())
332+
Configuration::phaseNeedsSoundEscapeAnalysis() and
333+
resultEscapesNonReturn(allocation.getABaseInstruction())
333334
}
334335

335336
/**

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ private module Cached {
6565
instr = reusedPhiInstruction(_) and
6666
// Check that the phi instruction is *not* degenerate, but we can't use
6767
// getDegeneratePhiOperand in the first stage with phi instyructions
68-
exists(OldIR::PhiInputOperand operand1, OldIR::PhiInputOperand operand2, OldInstruction oldInstruction |
68+
exists(
69+
OldIR::PhiInputOperand operand1, OldIR::PhiInputOperand operand2,
70+
OldInstruction oldInstruction
71+
|
6972
oldInstruction = instr and
7073
operand1 = oldInstruction.(OldIR::PhiInstruction).getAnInputOperand() and
7174
operand1.getPredecessorBlock() instanceof OldBlock and
@@ -79,13 +82,14 @@ private module Cached {
7982
instr instanceof TUnreachedInstruction
8083
}
8184

82-
cached IRBlock getNewBlock(OldBlock oldBlock) {
85+
cached
86+
IRBlock getNewBlock(OldBlock oldBlock) {
8387
exists(Instruction newEnd, OldIR::Instruction oldEnd |
8488
(
85-
result.getLastInstruction() = newEnd and
86-
not newEnd instanceof ChiInstruction
87-
or
88-
newEnd = result.getLastInstruction().(ChiInstruction).getAPredecessor() // does this work?
89+
result.getLastInstruction() = newEnd and
90+
not newEnd instanceof ChiInstruction
91+
or
92+
newEnd = result.getLastInstruction().(ChiInstruction).getAPredecessor() // does this work?
8993
) and
9094
(
9195
oldBlock.getLastInstruction() = oldEnd and

csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/AliasAnalysis.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ predicate allocationEscapes(Configuration::Allocation allocation) {
329329
config.useSoundEscapeAnalysis() and resultEscapesNonReturn(allocation.getABaseInstruction())
330330
)
331331
or
332-
Configuration::phaseNeedsSoundEscapeAnalysis() and resultEscapesNonReturn(allocation.getABaseInstruction())
332+
Configuration::phaseNeedsSoundEscapeAnalysis() and
333+
resultEscapesNonReturn(allocation.getABaseInstruction())
333334
}
334335

335336
/**

csharp/ql/src/experimental/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ private module Cached {
6565
instr = reusedPhiInstruction(_) and
6666
// Check that the phi instruction is *not* degenerate, but we can't use
6767
// getDegeneratePhiOperand in the first stage with phi instyructions
68-
exists(OldIR::PhiInputOperand operand1, OldIR::PhiInputOperand operand2, OldInstruction oldInstruction |
68+
exists(
69+
OldIR::PhiInputOperand operand1, OldIR::PhiInputOperand operand2,
70+
OldInstruction oldInstruction
71+
|
6972
oldInstruction = instr and
7073
operand1 = oldInstruction.(OldIR::PhiInstruction).getAnInputOperand() and
7174
operand1.getPredecessorBlock() instanceof OldBlock and
@@ -79,13 +82,14 @@ private module Cached {
7982
instr instanceof TUnreachedInstruction
8083
}
8184

82-
cached IRBlock getNewBlock(OldBlock oldBlock) {
85+
cached
86+
IRBlock getNewBlock(OldBlock oldBlock) {
8387
exists(Instruction newEnd, OldIR::Instruction oldEnd |
8488
(
85-
result.getLastInstruction() = newEnd and
86-
not newEnd instanceof ChiInstruction
87-
or
88-
newEnd = result.getLastInstruction().(ChiInstruction).getAPredecessor() // does this work?
89+
result.getLastInstruction() = newEnd and
90+
not newEnd instanceof ChiInstruction
91+
or
92+
newEnd = result.getLastInstruction().(ChiInstruction).getAPredecessor() // does this work?
8993
) and
9094
(
9195
oldBlock.getLastInstruction() = oldEnd and

0 commit comments

Comments
 (0)