Skip to content

Commit f2b7af7

Browse files
committed
CPP: Add example code for RoutineType.
1 parent beb3602 commit f2b7af7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

cpp/ql/src/semmle/code/cpp/Type.qll

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,8 +1374,14 @@ class PointerToMemberType extends Type, @ptrtomember {
13741374
}
13751375

13761376
/**
1377-
* A C/C++ routine type. Conceptually, this is what results from stripping away the pointer from a function pointer type.
1378-
* It has no corresponding syntax in C/C++.
1377+
* A C/C++ routine type. Conceptually, this is what results from stripping
1378+
* away the pointer from a function pointer type. It can also occur in C++
1379+
* code, for example the base type of `myRoutineType` in the following code:
1380+
* ```
1381+
* using myRoutineType = int(int);
1382+
*
1383+
* myRoutineType *fp = 0;
1384+
* ```
13791385
*/
13801386
class RoutineType extends Type, @routinetype {
13811387
/** a printable representation of this named element */

0 commit comments

Comments
 (0)