+2016-05-02 Arnaud Charlet <charlet@adacore.com>
+
+ * lib-xref-spark_specific.adb (Add_SPARK_Scope): add task type scope.
+ (Detect_And_Add_SPARK_Scope): detect and add task type scope.
+ (Enclosing_Subprogram_Or_Package): Respect boundaries of task
+ and entry declarations.
+ * spark_xrefs.ads: minor typo in comment.
+
2016-05-02 Arnaud Charlet <charlet@adacore.com>
* make.adb: Minor: avoid an exception when calling gnatmake with
| E_Generic_Package
| E_Generic_Procedure
| E_Package
+ | E_Task_Type
=>
Typ := Xref_Entity_Letters (Ekind (E));
Key => Entity_Id,
Hash => Entity_Hash,
Equal => "=");
- -- Package used to build a correspondance between entities and scope
+ -- Package used to build a correspondence between entities and scope
-- numbers used in SPARK cross references.
Nrefs : Nat := Xrefs.Last;
N_Subprogram_Declaration)
or else
Nkind_In (N, N_Task_Body, -- tasks
- N_Task_Body_Stub)
+ N_Task_Body_Stub,
+ N_Task_Type_Declaration)
then
Add_SPARK_Scope (N);
end if;
Result := Defining_Identifier (Result);
exit;
+ when N_Entry_Declaration =>
+ Result := Defining_Identifier (Result);
+ exit;
+
when N_Task_Body =>
Result := Defining_Identifier (Result);
exit;
+ when N_Task_Type_Declaration =>
+ Result := Defining_Identifier (Result);
+ exit;
+
when others =>
Result := Parent (Result);
end case;
-- --
-- S p e c --
-- --
--- Copyright (C) 2011-2015, Free Software Foundation, Inc. --
+-- Copyright (C) 2011-2016, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- FX dependency-number filename . entity-number entity
- -- dependency-number and filename identity a file in FD lines
+ -- dependency-number and filename identify a file in FD lines
-- entity-number and identity identify a scope entity in FS lines for
-- the file previously identified.