aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/sem_names.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-12-23 13:41:39 +0100
committerTristan Gingold <tgingold@free.fr>2018-12-23 13:41:39 +0100
commitfeb198c93bd936b20d5b3d878080ec4cdf7e480b (patch)
treeb27b263b31de29e77acc6bf271a3776661446637 /src/vhdl/sem_names.adb
parent73bb7fd335965c9c6079415ce50fb2059c3e6265 (diff)
downloadghdl-feb198c93bd936b20d5b3d878080ec4cdf7e480b.tar.gz
ghdl-feb198c93bd936b20d5b3d878080ec4cdf7e480b.tar.bz2
ghdl-feb198c93bd936b20d5b3d878080ec4cdf7e480b.zip
parse/sem: be more tolerante to parse errors.
Diffstat (limited to 'src/vhdl/sem_names.adb')
-rw-r--r--src/vhdl/sem_names.adb12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb
index da8637f82..03c1f1e40 100644
--- a/src/vhdl/sem_names.adb
+++ b/src/vhdl/sem_names.adb
@@ -889,16 +889,14 @@ package body Sem_Names is
Atype : Iir;
Res : Iir;
begin
- if Name = Null_Iir then
- pragma Assert (Flags.Flag_Force_Analysis);
- Res := Create_Error_Type (Null_Iir);
- Set_Type (Res, Res);
- return Res;
- end if;
-
-- The name must not have been analyzed.
pragma Assert (Get_Type (Name) = Null_Iir);
+ if Is_Error (Name) then
+ Set_Type (Name, Name);
+ return Name;
+ end if;
+
-- Analyze the name (if not already done).
Res := Get_Named_Entity (Name);
if Res = Null_Iir then