Skip to content

Commit ceec027

Browse files
committed
CPP: Add examples Initializer.qll.
1 parent e890aba commit ceec027

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
import semmle.code.cpp.controlflow.ControlFlowGraph
22

33
/**
4-
* A C/C++ declaration initializer.
4+
* A C/C++ declaration initializer. For example the initializers `1`, `2` and
5+
* `3` in the following code:
6+
* ```
7+
* int myVariable = 1;
8+
*
9+
* enum myEnum {
10+
* MYENUMCONST = 2
11+
* };
12+
*
13+
* void myFunction(int param = 3) {
14+
* ...
15+
* }
16+
* ```
517
*/
618
class Initializer extends ControlFlowNode, @initialiser {
719
override Location getLocation() { initialisers(underlyingElement(this),_,_,result) }

0 commit comments

Comments
 (0)