Skip to content

Commit a7ef84f

Browse files
committed
C++: Replace 'strictcount(...) = 1' with 'unique(...)'.
1 parent fefc02d commit a7ef84f

File tree

1 file changed

+2
-3
lines changed
  • cpp/ql/lib/semmle/code/cpp/ir/implementation/internal

1 file changed

+2
-3
lines changed

cpp/ql/lib/semmle/code/cpp/ir/implementation/internal/TOperand.qll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ private module Internal {
2323
newtype TOperand =
2424
// RAW
2525
TRegisterOperand(TRawInstruction useInstr, RegisterOperandTag tag, TRawInstruction defInstr) {
26-
defInstr = RawConstruction::getRegisterOperandDefinition(useInstr, tag) and
27-
not RawConstruction::isInCycle(useInstr) and
28-
strictcount(RawConstruction::getRegisterOperandDefinition(useInstr, tag)) = 1
26+
defInstr = unique( | | RawConstruction::getRegisterOperandDefinition(useInstr, tag)) and
27+
not RawConstruction::isInCycle(useInstr)
2928
} or
3029
// Placeholder for Phi and Chi operands in stages that don't have the corresponding instructions
3130
TNoOperand() { none() } or

0 commit comments

Comments
 (0)