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
10891089 function Get_Exemption_Kind
10901090 (Image : Wide_Wide_String) return Exemption_Kinds
10911091 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);
10931096 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;
11011101 else
1102- Result := Exemption_Kinds'Wide_Wide_Value (Image);
1103- end if ;
1104-
1105- return Result;
1106-
1107- exception
1108- when Constraint_Error =>
11091102 return Not_An_Exemption;
1103+ end if ;
11101104 end Get_Exemption_Kind ;
11111105
11121106 -- ---------------------------
You can’t perform that action at this time.
0 commit comments