From 906873ee165cbaabf36ca51792eb5a498a12bd72 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Mon, 12 Oct 2015 16:58:23 +0200 Subject: Move strip functions to Cutil. Since the strip functions might be useful in other context and is more general then the debug information. Bug 17392. --- cparser/Cutil.mli | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cparser/Cutil.mli') diff --git a/cparser/Cutil.mli b/cparser/Cutil.mli index a322bfb1..a09316ad 100644 --- a/cparser/Cutil.mli +++ b/cparser/Cutil.mli @@ -56,6 +56,10 @@ val attr_is_type_related: attribute -> bool (* Is an attribute type-related (true) or variable-related (false)? *) val attr_inherited_by_members: attribute -> bool (* Is an attribute of a composite inherited by members of the composite? *) +val strip_attributes_type: typ -> attribute list -> typ + (* Remove all attributes from the given type that are not contained in the list *) +val strip_last_attribute: typ -> attribute option * typ + (* Remove the last top level attribute and return it *) (* Type compatibility *) -- cgit From 60ab550a952c3d9719b2a91ec90c9b58769f6717 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 14 Oct 2015 15:07:48 +0200 Subject: bug 17392: remove trailing whitespace in source files --- cparser/Cutil.mli | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cparser/Cutil.mli') diff --git a/cparser/Cutil.mli b/cparser/Cutil.mli index a09316ad..8b6c609b 100644 --- a/cparser/Cutil.mli +++ b/cparser/Cutil.mli @@ -69,7 +69,7 @@ type attr_handling = | AttrIgnoreAll val compatible_types : attr_handling -> Env.t -> typ -> typ -> bool - (* Check that the two given types are compatible. + (* Check that the two given types are compatible. The attributes in the types are compared according to the first argument: - [AttrCompat]: the types must have the same standard attributes ([const], [volatile], [restrict]) but may differ on custom attributes. @@ -229,7 +229,7 @@ val ecommalist : exp list -> exp -> exp val sskip: stmt (* The [skip] statement. No location. *) val sseq : location -> stmt -> stmt -> stmt - (* Return the statement [s1; s2], optimizing the cases + (* Return the statement [s1; s2], optimizing the cases where [s1] or [s2] is [skip], or [s2] is a block. *) val sassign : location -> exp -> exp -> stmt (* Return the statement [exp1 = exp2;] *) -- cgit