Skip to content

Commit 3e46494

Browse files
committed
CPP: Clarify the Declaration / DeclarationEntry relationship around definitions, as there has been confusion over this.
1 parent bc4363b commit 3e46494

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ private import semmle.code.cpp.internal.QualifiedName as Q
1414
* ```
1515
* extern int myglobal;
1616
* ```
17-
* Each of these declarations is given its own distinct `DeclarationEntry`,
18-
* but they all share the same `Declaration`.
17+
* and defined in one:
18+
* ```
19+
* int myglobal;
20+
* ```
21+
* Each of these declarations (including the definition) is given its own
22+
* distinct `DeclarationEntry`, but they all share the same `Declaration`.
1923
*
2024
* Some derived class of `Declaration` do not have a corresponding
2125
* `DeclarationEntry`, because they always have a unique source ___location.

0 commit comments

Comments
 (0)