Skip to content

Commit c3bba38

Browse files
committed
C++: Fix QLDoc.
1 parent 1aea120 commit c3bba38

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,8 @@ private class BuiltinExpectCallInstruction extends CallInstruction {
929929

930930
/**
931931
* Holds if `left == right + k` is `areEqual` if `cmp` evaluates to `value`,
932-
* and `cmp` is nested inside a call to `__builtin_expect`.
932+
* and `cmp` is an instruction that compares the value of
933+
* `__builtin_expect(left == right + k, _)` to `0`.
933934
*/
934935
private predicate builtin_expect_eq(
935936
CompareInstruction cmp, Operand left, Operand right, int k, boolean areEqual, AbstractValue value
@@ -958,8 +959,8 @@ private predicate complex_eq(
958959
}
959960

960961
/**
961-
* Holds if `op == k` is `areEqual` if `cmp` evaluates to `value`, and
962-
* `cmp` is nested inside a call to `__builtin_expect`.
962+
* Holds if `op == k` is `areEqual` if `cmp` evaluates to `value`, and `cmp` is
963+
* an instruction that compares the value of `__builtin_expect(op == k, _)` to `0`.
963964
*/
964965
private predicate unary_builtin_expect_eq(
965966
CompareInstruction cmp, Operand op, int k, boolean areEqual, boolean inNonZeroCase,

0 commit comments

Comments
 (0)