Skip to content

Commit fcfc110

Browse files
committed
C++: add QLDoc to side effect functions
1 parent 8649978 commit fcfc110

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

cpp/ql/src/semmle/code/cpp/models/interfaces/SideEffect.qll

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,24 @@ abstract class SideEffectFunction extends Function {
2929
*/
3030
abstract predicate hasOnlySpecificWriteSideEffects();
3131

32+
/**
33+
* Holds if the value pointed to by the parameter at index `i` is written to. `buffer` is true
34+
* if the write may be at an offset. `mustWrite` is true if the write is unconditional.
35+
*/
3236
predicate hasSpecificWriteSideEffect(ParameterIndex i, boolean buffer, boolean mustWrite) {
3337
none()
3438
}
3539

40+
/**
41+
* Holds if the value pointed to by the parameter at index `i` is read from. `buffer` is true
42+
* if the read may be at an offset.
43+
*/
3644
predicate hasSpecificReadSideEffect(ParameterIndex i, boolean buffer) { none() }
3745

3846
// TODO: name?
47+
/**
48+
* Gets the index of the parameter that indicates the size of the buffer pointed to by the
49+
* parameter at index `i`.
50+
*/
3951
ParameterIndex getParameterSizeIndex(ParameterIndex i) { none() }
4052
}

0 commit comments

Comments
 (0)