Skip to content

Commit 6c7e809

Browse files
authored
Merge pull request #14961 from MathiasVP/unique-in-operand
C++: Replace a `strictcount(...)` with `unique(...)`
2 parents 71347e4 + a7ef84f commit 6c7e809

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)