File tree Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -1089,24 +1089,18 @@ package body Gnatcheck.Diagnoses is
1089
1089
function Get_Exemption_Kind
1090
1090
(Image : Wide_Wide_String) return Exemption_Kinds
1091
1091
is
1092
- Result : Exemption_Kinds;
1092
+ Norm_Image : constant Wide_Wide_String := To_Lower
1093
+ (if Image (Image'First) = ' "'
1094
+ then Image (Image'First + 1 .. Image'Last - 1 )
1095
+ else Image);
1093
1096
begin
1094
- if Image (Image'First) = ' "' then
1095
-
1096
- -- Old format of Annotate pragma. We have to cut out quotation marks
1097
-
1098
- Result :=
1099
- Exemption_Kinds'Wide_Wide_Value
1100
- (Image (Image'First + 1 .. Image'Last - 1 ));
1097
+ if Norm_Image = " exempt_on" then
1098
+ return Exempt_On;
1099
+ elsif Norm_Image = " exempt_off" then
1100
+ return Exempt_Off;
1101
1101
else
1102
- Result := Exemption_Kinds'Wide_Wide_Value (Image);
1103
- end if ;
1104
-
1105
- return Result;
1106
-
1107
- exception
1108
- when Constraint_Error =>
1109
1102
return Not_An_Exemption;
1103
+ end if ;
1110
1104
end Get_Exemption_Kind ;
1111
1105
1112
1106
-- ---------------------------
You can’t perform that action at this time.
0 commit comments