From: elfring@users.sourceforge.net (SF Markus Elfring) Date: Wed, 23 Aug 2017 16:43:14 +0200 Subject: [Cocci] Comparing statement lists with SmPL In-Reply-To: References: <69d615e4-0f62-2289-dd59-97c625ba47e8@users.sourceforge.net> <76e2fbf5-4812-18eb-2968-53019d97ab14@users.sourceforge.net> Message-ID: To: cocci@systeme.lip6.fr List-Id: cocci@systeme.lip6.fr > I have tried another variant out for a source code analysis. Does the following SmPL script variant make sense? @duplicated_code@ identifier work; statement s1, s2; type T; @@ T work(...) { ... when any *if ((...) < 0) *{ ... * s1 * s2 *} <+... *if ((...) < 0) *{ ... * s1 * s2 *} ...+> } Can this approach find interesting places in any source files? Regards, Markus