mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
ada: Avoid triggering ghost context errors on prefixed names
Errors for ghost incompatibilities of qualified names should not be applied to prefixes but rather only the final selector. gcc/ada/ChangeLog: * ghost.adb (Is_Ok_Context): consider ghost prefix to always be a valid ghost context.
This commit is contained in:
committed by
Marc Poulhiès
parent
f5836f73b1
commit
a740ac2bf8
@@ -740,6 +740,14 @@ package body Ghost is
|
||||
then
|
||||
return True;
|
||||
|
||||
-- It is always legal to use a ghost prefix. More complex
|
||||
-- scenarios are analyzed for the selector.
|
||||
|
||||
elsif Nkind (Par) = N_Selected_Component
|
||||
and then Prefix (Par) = Prev
|
||||
then
|
||||
return True;
|
||||
|
||||
elsif Is_OK_Declaration (Par) then
|
||||
return True;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user