File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -385,9 +385,20 @@ let is_bool_type (ik:ikind) =
385385
386386let has_const_attribute (t :typ ) =
387387 List. exists
388- (fun a -> match a with | Attr ("const" ,_ ) -> true | _ -> false )
388+ (fun a ->
389+ match a with
390+ | Attr ("const" , _ ) -> true
391+ | Attr ("pconst" , _ ) -> true
392+ | _ -> false )
389393 (get_typ_attributes t)
390394
395+
396+ let has_deref_const_attribute (t : typ ) =
397+ match t with
398+ | TPtr (tgt , _ ) -> has_const_attribute tgt
399+ | _ -> false
400+
401+
391402let is_char ik =
392403 match ik with IChar | ISChar | IUChar -> true | _ -> false
393404
Original file line number Diff line number Diff line change @@ -76,6 +76,8 @@ val enum_fits_kind: string -> ikind -> bool
7676
7777val has_const_attribute : typ -> bool
7878
79+ val has_deref_const_attribute : typ -> bool
80+
7981val is_not_zero : exp -> bool
8082
8183val is_safe_int_cast : ikind -> ikind -> bool
You can’t perform that action at this time.
0 commit comments