>> I hoped that the specified constraint for the metavariable “e” would mean
>> that expressions which contain a double quotation character should be 
>> excluded
>> for my source code analysis approach.
>> Would you like to check the observed software functionality once more?
>
> There is perhaps a problem, but it is surely not necessary to have all of
> this python code around it to see the problem.

I chose this test display so that it can be clearly seen which data were 
processes
for the metavariable “e”.


> Please make a minimal example.  A rule with a match and a * in front of it 
> should be sufficient.

Do you find constraints of the following SmPL script variant easier to clarify?

@display@
identifier i =~ "^(?:[A-Z]+_){3,3}[A-Z]+";
expression e !~ "\"";
@@
*#define i e

Test result:
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/97b01ed9b01bac7cba68ff11c6bf7ceabcae7f52/spa/include/spa/node/type-info.h#L38

elfring@Sonne:~/Projekte/PipeWire/lokal> spatch 
~/Projekte/Coccinelle/janitor/show_define_usage4.cocci 
spa/include/spa/node/type-info.h
…
@@ -35,8 +35,6 @@ extern "C" {
 #include <spa/node/event.h>
 #include <spa/node/io.h>

-#define SPA_TYPE_INFO_IO                       SPA_TYPE_INFO_ENUM_BASE "IO"
-#define SPA_TYPE_INFO_IO_BASE          SPA_TYPE_INFO_IO ":"

 static const struct spa_type_info spa_type_io[] = {
        { SPA_IO_Invalid, SPA_TYPE_Int, SPA_TYPE_INFO_IO_BASE "Invalid", NULL },
…


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

Reply via email to