Skip to content

Commit 2d2890e

Browse files
committed
CPP: Add examples Parameter.qll.
1 parent ceec027 commit 2d2890e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,18 @@ import semmle.code.cpp.Declaration
33
private import semmle.code.cpp.internal.ResolveClass
44

55
/**
6-
* A C/C++ function parameter or catch block parameter.
6+
* A C/C++ function parameter or catch block parameter. For example the
7+
* function parameter `p` and the catch block parameter `e` in the following
8+
* code:
9+
* ```
10+
* void myFunction(int p) {
11+
* try {
12+
* ...
13+
* } catch (const std::exception &e) {
14+
* ...
15+
* }
16+
* }
17+
* ```
718
*
819
* For catch block parameters, there is a one-to-one correspondence between
920
* the `Parameter` and its `ParameterDeclarationEntry`.

0 commit comments

Comments
 (0)