Skip to content

Commit d1cc28e

Browse files
committed
CPP: Address review comments.
1 parent ee07c70 commit d1cc28e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ private import semmle.code.cpp.internal.ResolveClass
77
* A C/C++ variable. For example, in the following code there are four
88
* variables, `a`, `b`, `c` and `d`:
99
* ```
10+
* extern int a;
1011
* int a;
1112
*
1213
* void myFunction(int b) {
1314
* int c;
1415
* }
1516
*
1617
* namespace N {
17-
* int d;
18+
* extern int d;
19+
* int d = 1;
1820
* }
1921
* ```
2022
*
@@ -174,9 +176,9 @@ class Variable extends Declaration, @variable {
174176
}
175177

176178
/**
177-
* A particular declaration or definition of a C/C++ variable. For example in
178-
* the following code there are five variable declaration entries - two for
179-
* `a`, and one each for `b`, `c` and `d`:
179+
* A particular declaration or definition of a C/C++ variable. For example, in
180+
* the following code there are six variable declaration entries - two each for
181+
* `a` and `d`, and one each for `b` and `c`:
180182
* ```
181183
* extern int a;
182184
* int a;
@@ -186,7 +188,8 @@ class Variable extends Declaration, @variable {
186188
* }
187189
*
188190
* namespace N {
189-
* int d;
191+
* extern int d;
192+
* int d = 1;
190193
* }
191194
* ```
192195
*/

0 commit comments

Comments
 (0)