CPP: Clarify the Declaration / DeclarationEntry relationship around definitions, as there has been confusion over this.

This commit is contained in:
Geoffrey White
2019-09-11 12:52:26 +01:00
parent bc4363bc22
commit 3e46494c3a

View File

@@ -14,8 +14,12 @@ private import semmle.code.cpp.internal.QualifiedName as Q
* ```
* extern int myglobal;
* ```
* Each of these declarations is given its own distinct `DeclarationEntry`,
* but they all share the same `Declaration`.
* and defined in one:
* ```
* int myglobal;
* ```
* Each of these declarations (including the definition) is given its own
* distinct `DeclarationEntry`, but they all share the same `Declaration`.
*
* Some derived class of `Declaration` do not have a corresponding
* `DeclarationEntry`, because they always have a unique source location.