Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7AA19C433E0 for ; Fri, 29 May 2020 12:08:36 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 494FE2077D for ; Fri, 29 May 2020 12:08:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dJgH/wTm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 494FE2077D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-kernel-mentees-bounces@lists.linuxfoundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2F5968847F; Fri, 29 May 2020 12:08:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id K5YM0d3FKnND; Fri, 29 May 2020 12:08:35 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id BEA6E88479; Fri, 29 May 2020 12:08:35 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id BBA41C07FF; Fri, 29 May 2020 12:08:35 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7E49AC016F for ; Fri, 29 May 2020 12:08:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7B3F288479 for ; Fri, 29 May 2020 12:08:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id adCVtYkgeBQt for ; Fri, 29 May 2020 12:08:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by whitealder.osuosl.org (Postfix) with ESMTPS id 1B83288473 for ; Fri, 29 May 2020 12:08:34 +0000 (UTC) Received: by mail-pj1-f67.google.com with SMTP id k2so1267925pjs.2 for ; Fri, 29 May 2020 05:08:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=egqE8QPOd0x0zRf1q0HdvBOn4qh0yTumMHvwgcA5GyI=; b=dJgH/wTmOjF1JIyfm9Am6/EVaE0PEC/FqZp5jQr+qR/Kc+4Xva+Tl21CVaWA50TcwY 3MHbIRiFRLBhpyYfO5IKH2Kgz67w3XMhg82Qpw4XCSixIoOnRPaK4Iad00UHAwFipkPr nebVfFVmwMPhW5kD18UtM8wTWOntHl2fQhX18KCrTEg8QhVbUMjITDaD6ELY6j3fs68W Kx1vJbXUe/gkmccDdKqqypiuy8S600ln6jcTml56e10z4FYuGJ0iApfJkperNsWDw5p+ zKZUU3HNZKyJbLKDvjRNOxzxrrrEkhbjgx8+/g5qeXmFYmJ9p8qhotk6o9E7oyOPGrug eE1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=egqE8QPOd0x0zRf1q0HdvBOn4qh0yTumMHvwgcA5GyI=; b=Sm4/mAGEknrGRGIVJSZEUNGuUP6UWHN0D23JHd9xv62I8W6ZX9vMRWp5xqXVsnITrR BLqYbbU1AeXElZCoVsxSEbNpSRGQxug1Fcj34ENgQCPdMbBaHzBaLNVWoFNf5xg1SYs/ 58OpKhZ1z31W/sdT0rGrREMO+pyVknc8x5ag2L3TyRYkKGiRvXhnJtjJnNuaT8siCQvp 8Xg970uFHq+U3BlkfQujrsmPx14Y0cVEEAxm1kl774l+1uNLgrouqUY55VO3kHEZiA+A 9VpkK4219pKDqnXhyX9OXHskwpzTUoM7GGCGfIU6hCC1dkuuKt8tRIgveNrnv9oERfKR STUQ== X-Gm-Message-State: AOAM533BZ+47mus6JvsxyV8OC/hTKbeCm8rAzpJM3qPnN46Z1/c2YJQB 27h7BXC0Xg2EU6RKx3DH530= X-Google-Smtp-Source: ABdhPJxEFtk2C0FMLJIOp7Sz4sQMJzP36q/z4YJRFKApRPu0Uy9W1/xGiaTBWR/dnl2UhdTwFsdpWQ== X-Received: by 2002:a17:90a:bb8b:: with SMTP id v11mr9200107pjr.50.1590754113632; Fri, 29 May 2020 05:08:33 -0700 (PDT) Received: from localhost.localdomain ([2402:3a80:694:e576:19d1:a79b:707d:59f2]) by smtp.gmail.com with ESMTPSA id dw13sm7975161pjb.40.2020.05.29.05.08.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2020 05:08:33 -0700 (PDT) From: Jaskaran Singh To: cocci@systeme.lip6.fr Date: Fri, 29 May 2020 17:36:34 +0530 Message-Id: <20200529120703.31145-5-jaskaransingh7654321@gmail.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200529120703.31145-1-jaskaransingh7654321@gmail.com> References: <20200529120703.31145-1-jaskaransingh7654321@gmail.com> MIME-Version: 1.0 Cc: julia.lawall@inria.fr, jaskaransingh7654321@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org Subject: [Linux-kernel-mentees] [PATCH v3 04/32] parsing_cocci: visitor_ast0: Visit cast attributes X-BeenThere: linux-kernel-mentees@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-kernel-mentees-bounces@lists.linuxfoundation.org Sender: "Linux-kernel-mentees" Cast attributes are added to AST0 of SmPL. Visit these attributes in the AST0 visitor of SmPL. Signed-off-by: Jaskaran Singh --- parsing_cocci/visitor_ast0.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/parsing_cocci/visitor_ast0.ml b/parsing_cocci/visitor_ast0.ml index d6feccb7..0a7068b7 100644 --- a/parsing_cocci/visitor_ast0.ml +++ b/parsing_cocci/visitor_ast0.ml @@ -184,12 +184,14 @@ let visitor mode bind option_default let (ar_n,ar) = string_mcode ar in let (field_n,field) = ident field in (multibind [exp_n;ar_n;field_n], Ast0.RecordPtAccess(exp,ar,field)) - | Ast0.Cast(lp,ty,rp,exp) -> + | Ast0.Cast(lp,ty,attr,rp,exp) -> let (lp_n,lp) = string_mcode lp in let (ty_n,ty) = typeC ty in + let (attr_n,attr) = map_split_bind string_mcode attr in let (rp_n,rp) = string_mcode rp in let (exp_n,exp) = expression exp in - (multibind [lp_n;ty_n;rp_n;exp_n], Ast0.Cast(lp,ty,rp,exp)) + (multibind [lp_n;ty_n;attr_n;rp_n;exp_n], + Ast0.Cast(lp,ty,attr,rp,exp)) | Ast0.SizeOfExpr(szf,exp) -> let (szf_n,szf) = string_mcode szf in let (exp_n,exp) = expression exp in -- 2.21.1 _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees