All of lore.kernel.org
 help / color / mirror / Atom feed
From: mstefani@redhat.com (Michael Stefaniuc)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Incorrect skipping on custom types in type list
Date: Thu, 28 Nov 2013 22:10:49 +0100	[thread overview]
Message-ID: <5297B159.6080909@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1311280941190.2092@hadrien>

On 11/28/2013 09:42 AM, Julia Lawall wrote:
> A patch is below.  Thanks for the report!
> 
> julia
> 
> diff --git a/parsing_cocci/get_constants2.ml b/parsing_cocci/get_constants2.ml
> index 80a512c..ed6e038 100644
> --- a/parsing_cocci/get_constants2.ml
> +++ b/parsing_cocci/get_constants2.ml
> @@ -309,12 +309,12 @@ let do_get_constants constants keywords env neg_pos =
>    let rec type_collect res = function
>        TC.ConstVol(_,ty) | TC.Pointer(ty) | TC.FunctionPointer(ty)
>      | TC.Array(ty) -> type_collect res ty
> -    | TC.Decimal _ -> keywords "decimal"
> +    | TC.Decimal _ -> build_or res (keywords "decimal")
>      | TC.MetaType(tyname,_,_) ->
> -	inherited tyname
> -    | TC.TypeName(s) -> constants s
> -    | TC.EnumName(TC.Name s) -> constants s
> -    | TC.StructUnionName(_,TC.Name s) -> constants s
> +	build_or res (inherited tyname)
> +    | TC.TypeName(s) -> build_or res (constants s)
> +    | TC.EnumName(TC.Name s) -> build_or res (constants s)
> +    | TC.StructUnionName(_,TC.Name s) -> build_or res (constants s)
>      | ty -> res in
> 
>    (* no point to do anything special for records because glimpse is
> 

Thanks Julia, that fixed it.

bye
	michael

      reply	other threads:[~2013-11-28 21:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-27 22:26 [Cocci] Incorrect skipping on custom types in type list Michael Stefaniuc
2013-11-27 22:46 ` Julia Lawall
2013-11-28  8:42 ` Julia Lawall
2013-11-28 21:10   ` Michael Stefaniuc [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5297B159.6080909@redhat.com \
    --to=mstefani@redhat.com \
    --cc=cocci@systeme.lip6.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.