Skip to content

Commit 89a1fd4

Browse files
author
Dave Bartolomeo
committed
C++/C#: Fix formatting
1 parent eac3b06 commit 89a1fd4

File tree

5 files changed

+13
-29
lines changed

5 files changed

+13
-29
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,7 @@ private Instruction getNewInstruction(OldInstruction instr) { getOldInstruction(
338338

339339
private OldInstruction getOldInstruction(Instruction instr) { instr = result }
340340

341-
private ChiInstruction getChi(OldInstruction primaryInstr) {
342-
result = chiInstruction(primaryInstr)
343-
}
341+
private ChiInstruction getChi(OldInstruction primaryInstr) { result = chiInstruction(primaryInstr) }
344342

345343
private PhiInstruction getPhi(OldBlock defBlock, Alias::MemoryLocation defLocation) {
346344
result = phiInstruction(defBlock.getFirstInstruction(), defLocation)

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

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ private import Imports::Opcode
1515
cached
1616
newtype TInstruction =
1717
TRawInstruction(
18-
IRConstruction::Raw::InstructionTag1 tag1,
19-
IRConstruction::Raw::InstructionTag2 tag2
18+
IRConstruction::Raw::InstructionTag1 tag1, IRConstruction::Raw::InstructionTag2 tag2
2019
) {
2120
IRConstruction::Raw::hasInstruction(tag1, tag2)
2221
} or
2322
TUnaliasedSSAPhiInstruction(
24-
TRawInstruction blockStartInstr,
25-
UnaliasedSSA::SSA::MemoryLocation memoryLocation
23+
TRawInstruction blockStartInstr, UnaliasedSSA::SSA::MemoryLocation memoryLocation
2624
) {
2725
UnaliasedSSA::SSA::hasPhiInstruction(blockStartInstr, memoryLocation)
2826
} or
@@ -31,8 +29,7 @@ newtype TInstruction =
3129
UnaliasedSSA::SSA::hasUnreachedInstruction(irFunc)
3230
} or
3331
TAliasedSSAPhiInstruction(
34-
TRawInstruction blockStartInstr,
35-
AliasedSSA::SSA::MemoryLocation memoryLocation
32+
TRawInstruction blockStartInstr, AliasedSSA::SSA::MemoryLocation memoryLocation
3633
) {
3734
AliasedSSA::SSA::hasPhiInstruction(blockStartInstr, memoryLocation)
3835
} or
@@ -53,8 +50,7 @@ module UnaliasedSSAInstructions {
5350
class TPhiInstruction = TUnaliasedSSAPhiInstruction;
5451

5552
TPhiInstruction phiInstruction(
56-
TRawInstruction blockStartInstr,
57-
UnaliasedSSA::SSA::MemoryLocation memoryLocation
53+
TRawInstruction blockStartInstr, UnaliasedSSA::SSA::MemoryLocation memoryLocation
5854
) {
5955
result = TUnaliasedSSAPhiInstruction(blockStartInstr, memoryLocation)
6056
}
@@ -82,8 +78,7 @@ module AliasedSSAInstructions {
8278
class TPhiInstruction = TAliasedSSAPhiInstruction;
8379

8480
TPhiInstruction phiInstruction(
85-
TRawInstruction blockStartInstr,
86-
AliasedSSA::SSA::MemoryLocation memoryLocation
81+
TRawInstruction blockStartInstr, AliasedSSA::SSA::MemoryLocation memoryLocation
8782
) {
8883
result = TAliasedSSAPhiInstruction(blockStartInstr, memoryLocation)
8984
}

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,7 @@ private Instruction getNewInstruction(OldInstruction instr) { getOldInstruction(
338338

339339
private OldInstruction getOldInstruction(Instruction instr) { instr = result }
340340

341-
private ChiInstruction getChi(OldInstruction primaryInstr) {
342-
result = chiInstruction(primaryInstr)
343-
}
341+
private ChiInstruction getChi(OldInstruction primaryInstr) { result = chiInstruction(primaryInstr) }
344342

345343
private PhiInstruction getPhi(OldBlock defBlock, Alias::MemoryLocation defLocation) {
346344
result = phiInstruction(defBlock.getFirstInstruction(), defLocation)

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

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ private import Imports::Opcode
1515
cached
1616
newtype TInstruction =
1717
TRawInstruction(
18-
IRConstruction::Raw::InstructionTag1 tag1,
19-
IRConstruction::Raw::InstructionTag2 tag2
18+
IRConstruction::Raw::InstructionTag1 tag1, IRConstruction::Raw::InstructionTag2 tag2
2019
) {
2120
IRConstruction::Raw::hasInstruction(tag1, tag2)
2221
} or
2322
TUnaliasedSSAPhiInstruction(
24-
TRawInstruction blockStartInstr,
25-
UnaliasedSSA::SSA::MemoryLocation memoryLocation
23+
TRawInstruction blockStartInstr, UnaliasedSSA::SSA::MemoryLocation memoryLocation
2624
) {
2725
UnaliasedSSA::SSA::hasPhiInstruction(blockStartInstr, memoryLocation)
2826
} or
@@ -31,8 +29,7 @@ newtype TInstruction =
3129
UnaliasedSSA::SSA::hasUnreachedInstruction(irFunc)
3230
} or
3331
TAliasedSSAPhiInstruction(
34-
TRawInstruction blockStartInstr,
35-
AliasedSSA::SSA::MemoryLocation memoryLocation
32+
TRawInstruction blockStartInstr, AliasedSSA::SSA::MemoryLocation memoryLocation
3633
) {
3734
AliasedSSA::SSA::hasPhiInstruction(blockStartInstr, memoryLocation)
3835
} or
@@ -53,8 +50,7 @@ module UnaliasedSSAInstructions {
5350
class TPhiInstruction = TUnaliasedSSAPhiInstruction;
5451

5552
TPhiInstruction phiInstruction(
56-
TRawInstruction blockStartInstr,
57-
UnaliasedSSA::SSA::MemoryLocation memoryLocation
53+
TRawInstruction blockStartInstr, UnaliasedSSA::SSA::MemoryLocation memoryLocation
5854
) {
5955
result = TUnaliasedSSAPhiInstruction(blockStartInstr, memoryLocation)
6056
}
@@ -82,8 +78,7 @@ module AliasedSSAInstructions {
8278
class TPhiInstruction = TAliasedSSAPhiInstruction;
8379

8480
TPhiInstruction phiInstruction(
85-
TRawInstruction blockStartInstr,
86-
AliasedSSA::SSA::MemoryLocation memoryLocation
81+
TRawInstruction blockStartInstr, AliasedSSA::SSA::MemoryLocation memoryLocation
8782
) {
8883
result = TAliasedSSAPhiInstruction(blockStartInstr, memoryLocation)
8984
}

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,7 @@ private Instruction getNewInstruction(OldInstruction instr) { getOldInstruction(
338338

339339
private OldInstruction getOldInstruction(Instruction instr) { instr = result }
340340

341-
private ChiInstruction getChi(OldInstruction primaryInstr) {
342-
result = chiInstruction(primaryInstr)
343-
}
341+
private ChiInstruction getChi(OldInstruction primaryInstr) { result = chiInstruction(primaryInstr) }
344342

345343
private PhiInstruction getPhi(OldBlock defBlock, Alias::MemoryLocation defLocation) {
346344
result = phiInstruction(defBlock.getFirstInstruction(), defLocation)

0 commit comments

Comments
 (0)