Hello,

I would like to try another specific source code analysis out.
My approach contains the following semantic patch rule.

@non_void_single_function_call@
identifier caller, input, result, work;
type data_type,
     input_type,
     return_type !~ "void";
position pos;
@@
 return_type caller@pos(input_type input)
 {
(
  return work(input);
|
  data_type result = work(input);
  return result;
)
 }


But I wonder about the following error message.

elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch.opt -sp-file 
list_functions_with_single_function_call1.cocci -dir 
/usr/src/linux-stable/drivers/gpu/drm/ast
init_defs_builtins: /usr/local/share/coccinelle/standard.h
1612 1614
Fatal error: exception Failure("meta: parse error: 
 = File "list_functions_with_single_function_call1.cocci", line 77, column 17,  
charpos = 1612
    around = '!~', whole content =      return_type !~ "void";
")


Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to