+2019-12-18 Bob Duff <duff@adacore.com>
+
+ * sem_ch8.adb (Note_Redundant_Use): It was already checking for
+ a use clause in the visible part of the child. Add an additional
+ check for a use clause in the context clause of the child.
+
2019-12-16 Bob Duff <duff@adacore.com>
* errout.adb (Handle_Serious_Error): Disable the above-mentioned
Par : constant Entity_Id := Defining_Entity (Parent (Decl));
Spec : constant Node_Id :=
Specification (Unit (Cunit (Current_Sem_Unit)));
-
+ Cur_List : constant List_Id := List_Containing (Cur_Use);
begin
if Is_Compilation_Unit (Par)
and then Par /= Cunit_Entity (Current_Sem_Unit)
- and then Parent (Cur_Use) = Spec
- and then List_Containing (Cur_Use) =
- Visible_Declarations (Spec)
then
- return;
+ if Cur_List = Context_Items (Cunit (Current_Sem_Unit))
+ or else Cur_List = Visible_Declarations (Spec)
+ then
+ return;
+ end if;
end if;
end;
end if;
then
Redundant := Clause;
Prev_Use := Cur_Use;
-
end if;
if Present (Redundant) and then Parent (Redundant) /= Prev_Use then