From mboxrd@z Thu Jan 1 00:00:00 1970 From: linjia@ruijie.com.cn (=?gb2312?B?wda8ziizzLb+ILij1t0p?=) Date: Sun, 26 Jan 2014 07:10:02 +0000 Subject: [Cocci] how to write such matching case? In-Reply-To: References: <041CF35939B5534D851F16C30DD0B8CF727F4841@fzex.ruijie.com.cn> <041CF35939B5534D851F16C30DD0B8CF727F5C4F@fzex.ruijie.com.cn> <041CF35939B5534D851F16C30DD0B8CF727F5CA5@fzex.ruijie.com.cn> <041CF35939B5534D851F16C30DD0B8CF727F5D5A@fzex.ruijie.com.cn> <041CF35939B5534D851F16C30DD0B8CF727F89C4@fzex.ruijie.com.cn> <041CF35939B5534D851F16C30DD0B8CF727F8A3E@fzex.ruijie.com.cn> <041CF35939B5534D851F16C30DD0B8CF727F8ACB@fzex.ruijie.com.cn> <041CF35939B5534D851F16C30DD0B8CF727F8AEF@fzex.ruijie.com.cn> <041CF35939B5534D851F16C30DD0B8CF727F8BD2@fzex.ruijie.com.cn> Message-ID: <041CF35939B5534D851F16C30DD0B8CF727FCF1B@fzex.ruijie.com.cn> To: cocci@systeme.lip6.fr List-Id: cocci@systeme.lip6.fr In my project, it's required that if function A is called, and function B must be called following, just like this Foo(...) { If ... { A(....); ... B(....); } } Or Foo1(...) { A(....); B(...); } How to write a patch to find the missing case? Such as Foo(...) { If ... { A(....); ... } } Or Foo1(...) { A(....); ... }