Coccinelle Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] Finding function implementations that call only a single function.
@ 2014-11-28 22:33 SF Markus Elfring
       [not found] ` <alpine.DEB.2.02.1412032218310.2303@localhost6.localdomain6>
  0 siblings, 1 reply; 15+ messages in thread
From: SF Markus Elfring @ 2014-11-28 22:33 UTC (permalink / raw)
  To: cocci

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 at pos(input_type input)
 {
(
  return work(input);
|
  data_type result = work(input);
  return result;
)
 }


But I wonder about the following error message.

elfring at 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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-12-17 20:30 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-28 22:33 [Cocci] Finding function implementations that call only a single function SF Markus Elfring
     [not found] ` <alpine.DEB.2.02.1412032218310.2303@localhost6.localdomain6>
     [not found]   ` <547F8C2B.5090601@users.sourceforge.net>
     [not found]     ` <alpine.DEB.2.02.1412032334330.2303@localhost6.localdomain6>
2014-12-05 14:20       ` SF Markus Elfring
     [not found]         ` <alpine.DEB.2.10.1412051633240.2360@hadrien>
2014-12-05 20:05           ` SF Markus Elfring
     [not found]             ` <54834F76.1090104@users.sourceforge.net>
     [not found]               ` <alpine.DEB.2.10.1412061955440.2042@hadrien>
     [not found]                 ` <548358DE.6020409@users.sourceforge.net>
     [not found]                   ` <alpine.DEB.2.02.1412062139570.2256@localhost6.localdomain6>
     [not found]                     ` <548371FB.9060402@users.sourceforge.net>
     [not found]                       ` <alpine.DEB.2.02.1412062219530.2256@localhost6.localdomain6>
     [not found]                         ` <54837413.8000902@users.sourceforge.net>
     [not found]                           ` <alpine.DEB.2.02.1412062232470.2256@localhost6.localdomain6>
     [not found]                             ` <5483806D.3070805@users.sourceforge.net>
     [not found]                               ` <alpine.DEB.2.02.1412062342540.2256@localhost6.localdomain6>
     [not found]                                 ` <5483902E.8060109@users.sourceforge.net>
     [not found]                                   ` <alpine.DEB.2.02.1412070749130.2044@localhost6.localdomain6>
2014-12-07  9:15                                     ` SF Markus Elfring
2014-12-07  9:31                                       ` Julia Lawall
2014-12-07 10:22                                         ` SF Markus Elfring
2014-12-07 10:28                                           ` Julia Lawall
2014-12-07 10:37                                             ` SF Markus Elfring
2014-12-07 11:45                                               ` Julia Lawall
2014-12-07 12:00                                                 ` SF Markus Elfring
2014-12-07 12:38                                                   ` Julia Lawall
2014-12-07 14:41                                                     ` SF Markus Elfring
2014-12-17 15:30                                                       ` SF Markus Elfring
2014-12-17 19:20                                                         ` Julia Lawall
2014-12-17 20:30                                                           ` [Cocci] Distinguishing pointer data types with SmPL SF Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox