-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle SubpBody's DefiningName self reference in P_Gnat_Xref
When resolving a subprogram body, the subprogram body's name xrefs contain a reference to itself. This patch adds that case to `P_Gnat_Xref` in order to mimic GNAT's behavior.
- Loading branch information
Showing
5 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
project Prj is | ||
for Source_Dirs use ("."); | ||
for Main use ("test.adb"); | ||
end Prj; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
procedure P is | ||
begin | ||
null; | ||
end P; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
test.adb:1:11: warning: file name does not match unit name, should be "p.adb" [enabled by default] | ||
== test.adb == | ||
test.adb:1:11 => test.adb:1:11 (LAL: ok) | ||
test.adb:4:5 => test.adb:1:11 (LAL: ok) | ||
|
||
Stats: | ||
GNAT xrefs have 2 entries | ||
LAL xrefs have: | ||
* 2 OK entries (100.00%) | ||
* 0 DIFFERENT entries (0.00%) | ||
* 0 ERROR entries (0.00%) | ||
* 0 MISSING entries (0.00%) | ||
* 0 ADDITIONAL entries (0.00%) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
driver: gnat-compare | ||
project_file: prj.gpr |