@@ -31,16 +31,18 @@ class FunctionInput extends TFunctionInput {
31
31
32
32
/**
33
33
* Holds if this is the input value of the parameter with index `index`.
34
+ *
34
35
* Example:
35
36
* ```
36
37
* void func(int n, char* p, float& r);
37
38
* ```
38
- * `isParameter(0)` holds for the `FunctionInput` that represents the value of `n` (with type
39
+ * - `isParameter(0)` holds for the `FunctionInput` that represents the value of `n` (with type
39
40
* `int`) on entry to the function.
40
- * `isParameter(1)` holds for the `FunctionInput` that represents the value of `p` (with type
41
+ * - `isParameter(1)` holds for the `FunctionInput` that represents the value of `p` (with type
41
42
* `char*`) on entry to the function.
42
- * `isParameter(2)` holds for the `FunctionInput` that represents the "value" of the reference `r`
43
- * (with type `float&`) on entry to the function, _not_ the value of the referred-to `float`.
43
+ * - `isParameter(2)` holds for the `FunctionInput` that represents the "value" of the reference
44
+ * `r` (with type `float&`) on entry to the function, _not_ the value of the referred-to
45
+ * `float`.
44
46
*/
45
47
predicate isParameter ( ParameterIndex index ) { none ( ) }
46
48
@@ -52,60 +54,63 @@ class FunctionInput extends TFunctionInput {
52
54
53
55
/**
54
56
* Holds if this is the input value pointed to by a pointer parameter to a function, or the input
55
- * value referred to by a reference parameter to a function, where the parameter has index
56
- * `index`.
57
+ * value referred to by a reference parameter to a function, where the parameter has index
58
+ * `index`.
59
+ *
57
60
* Example:
58
61
* ```
59
62
* void func(int n, char* p, float& r);
60
63
* ```
61
- * `isParameterDeref(1)` holds for the `FunctionInput` that represents the value of `*p` (with
64
+ * - `isParameterDeref(1)` holds for the `FunctionInput` that represents the value of `*p` (with
62
65
* type `char`) on entry to the function.
63
- * `isParameterDeref(2)` holds for the `FunctionInput` that represents the value of `r` (with type
66
+ * - `isParameterDeref(2)` holds for the `FunctionInput` that represents the value of `r` (with type
64
67
* `float`) on entry to the function.
65
- * There is no `FunctionInput` for which `isParameterDeref(0)` holds, because `n` is neither a
68
+ * - There is no `FunctionInput` for which `isParameterDeref(0)` holds, because `n` is neither a
66
69
* pointer nor a reference.
67
70
*/
68
71
predicate isParameterDeref ( ParameterIndex index ) { none ( ) }
69
72
70
73
/**
71
74
* Holds if this is the input value pointed to by a pointer parameter to a function, or the input
72
- * value referred to by a reference parameter to a function, where the parameter has index
73
- * `index`.
75
+ * value referred to by a reference parameter to a function, where the parameter has index
76
+ * `index`.
74
77
* DEPRECATED: Use `isParameterDeref(index)` instead.
75
78
*/
76
79
deprecated final predicate isInParameterPointer ( ParameterIndex index ) { isParameterDeref ( index ) }
77
80
78
81
/**
79
82
* Holds if this is the input value pointed to by the `this` pointer of an instance member
80
- * function.
83
+ * function.
84
+ *
81
85
* Example:
82
86
* ```
83
87
* struct C {
84
88
* void mfunc(int n, char* p, float& r) const;
85
89
* };
86
90
* ```
87
- * `isQualifierObject()` holds for the `FunctionInput` that represents the value of `*this` (with
88
- * type `C const`) on entry to the function.
91
+ * - `isQualifierObject()` holds for the `FunctionInput` that represents the value of `*this`
92
+ * (with type `C const`) on entry to the function.
89
93
*/
90
94
predicate isQualifierObject ( ) { none ( ) }
91
95
92
96
/**
93
97
* Holds if this is the input value pointed to by the `this` pointer of an instance member
94
- * function.
98
+ * function.
95
99
* DEPRECATED: Use `isQualifierObject()` instead.
96
100
*/
97
101
deprecated final predicate isInQualifier ( ) { isQualifierObject ( ) }
98
102
99
103
/**
100
104
* Holds if this is the input value of the `this` pointer of an instance member function.
105
+ *
101
106
* Example:
102
107
* ```
103
108
* struct C {
104
109
* void mfunc(int n, char* p, float& r) const;
105
110
* };
106
111
* ```
107
- * `isQualifierAddress()` holds for the `FunctionInput` that represents the value of `this` (with
108
- * type `C const *`) on entry to the function.
112
+ * - `isQualifierAddress()` holds for the `FunctionInput` that represents the value of `this`
113
+ * (with type `C const *`) on entry to the function.
109
114
*/
110
115
predicate isQualifierAddress ( ) { none ( ) }
111
116
}
@@ -167,62 +172,66 @@ class FunctionOutput extends TFunctionOutput {
167
172
168
173
/**
169
174
* Holds if this is the output value pointed to by a pointer parameter to a function, or the
170
- * output value referred to by a reference parameter to a function, where the parameter has
171
- * index `index`.
175
+ * output value referred to by a reference parameter to a function, where the parameter has
176
+ * index `index`.
177
+ *
172
178
* Example:
173
179
* ```
174
180
* void func(int n, char* p, float& r);
175
181
* ```
176
- * `isParameterDeref(1)` holds for the `FunctionOutput` that represents the value of `*p` (with
182
+ * - `isParameterDeref(1)` holds for the `FunctionOutput` that represents the value of `*p` (with
177
183
* type `char`) on return from the function.
178
- * `isParameterDeref(2)` holds for the `FunctionOutput` that represents the value of `r` (with
184
+ * - `isParameterDeref(2)` holds for the `FunctionOutput` that represents the value of `r` (with
179
185
* type `float`) on return from the function.
180
- * There is no `FunctionOutput` for which `isParameterDeref(0)` holds, because `n` is neither a
186
+ * - There is no `FunctionOutput` for which `isParameterDeref(0)` holds, because `n` is neither a
181
187
* pointer nor a reference.
182
188
*/
183
189
predicate isParameterDeref ( ParameterIndex i ) { none ( ) }
184
190
185
191
/**
186
192
* Holds if this is the output value pointed to by a pointer parameter to a function, or the
187
- * output value referred to by a reference parameter to a function, where the parameter has
188
- * index `index`.
193
+ * output value referred to by a reference parameter to a function, where the parameter has
194
+ * index `index`.
189
195
* DEPRECATED: Use `isParameterDeref(index)` instead.
190
196
*/
191
197
deprecated final predicate isOutParameterPointer ( ParameterIndex index ) { isParameterDeref ( index ) }
192
198
193
199
/**
194
200
* Holds if this is the output value pointed to by the `this` pointer of an instance member
195
201
* function.
202
+ *
203
+ * Example:
196
204
* ```
197
205
* struct C {
198
206
* void mfunc(int n, char* p, float& r);
199
207
* };
200
208
* ```
201
- * `isQualifierObject()` holds for the `FunctionOutput` that represents the value of `*this` (with
202
- * type `C`) on return from the function.
209
+ * - `isQualifierObject()` holds for the `FunctionOutput` that represents the value of `*this`
210
+ * (with type `C`) on return from the function.
203
211
*/
204
212
predicate isQualifierObject ( ) { none ( ) }
205
213
206
214
/**
207
215
* Holds if this is the output value pointed to by the `this` pointer of an instance member
208
- * function.
216
+ * function.
209
217
* DEPRECATED: Use `isQualifierObject()` instead.
210
218
*/
211
219
deprecated final predicate isOutQualifier ( ) { isQualifierObject ( ) }
212
220
213
221
/**
214
222
* Holds if this is the value returned by a function.
223
+ *
215
224
* Example:
216
225
* ```
217
226
* int getInt();
218
227
* char* getPointer();
219
228
* float& getReference();
220
229
* ```
221
- * `isReturnValue()` holds for the `FunctionOutput` that represents the value returned by
230
+ * - `isReturnValue()` holds for the `FunctionOutput` that represents the value returned by
222
231
* `getInt()` (with type `int`).
223
- * `isReturnValue()` holds for the `FunctionOutput` that represents the value returned by
232
+ * - `isReturnValue()` holds for the `FunctionOutput` that represents the value returned by
224
233
* `getPointer()` (with type `char*`).
225
- * `isReturnValue()` holds for the `FunctionOutput` that represents the "value" of the reference
234
+ * - `isReturnValue()` holds for the `FunctionOutput` that represents the "value" of the reference
226
235
* returned by `getReference()` (with type `float&`), _not_ the value of the referred-to
227
236
* `float`.
228
237
*/
@@ -236,30 +245,30 @@ class FunctionOutput extends TFunctionOutput {
236
245
237
246
/**
238
247
* Holds if this is the output value pointed to by the return value of a function, if the function
239
- * returns a pointer, or the output value referred to by the return value of a function, if the
240
- * function returns a reference.
248
+ * returns a pointer, or the output value referred to by the return value of a function, if the
249
+ * function returns a reference.
250
+ *
241
251
* Example:
242
252
* ```
243
253
* char* getPointer();
244
254
* float& getReference();
245
255
* int getInt();
246
256
* ```
247
- * `isReturnValueDeref()` holds for the `FunctionOutput` that represents the value of
257
+ * - `isReturnValueDeref()` holds for the `FunctionOutput` that represents the value of
248
258
* `*getPointer()` (with type `char`).
249
- * `isReturnValueDeref()` holds for the `FunctionOutput` that represents the value of
259
+ * - `isReturnValueDeref()` holds for the `FunctionOutput` that represents the value of
250
260
* `getReference()` (with type `float`).
251
- * There is no `FunctionOutput` of `getInt()` for which `isReturnValueDeref()` holds because the
261
+ * - There is no `FunctionOutput` of `getInt()` for which `isReturnValueDeref()` holds because the
252
262
* return type of `getInt()` is neither a pointer nor a reference.
253
263
*/
254
264
predicate isReturnValueDeref ( ) { none ( ) }
255
265
256
- /*
266
+ /**
257
267
* Holds if this is the output value pointed to by the return value of a function, if the function
258
- * returns a pointer, or the output value referred to by the return value of a function, if the
259
- * function returns a reference.
268
+ * returns a pointer, or the output value referred to by the return value of a function, if the
269
+ * function returns a reference.
260
270
* DEPRECATED: Use `isReturnValueDeref()` instead.
261
271
*/
262
-
263
272
deprecated final predicate isOutReturnPointer ( ) { isReturnValueDeref ( ) }
264
273
}
265
274
@@ -276,7 +285,7 @@ class OutParameterDeref extends FunctionOutput, TOutParameterDeref {
276
285
}
277
286
278
287
class OutQualifierObject extends FunctionOutput , TOutQualifierObject {
279
- override string toString ( ) { result = "OutQualifier " }
288
+ override string toString ( ) { result = "OutQualifierObject " }
280
289
281
290
override predicate isQualifierObject ( ) { any ( ) }
282
291
}
0 commit comments