Skip to contentSkip to conversation

Improving support for iteration statements by SmPL?

cocci Markus Elfring 1 participant 1 message Sep 21, 2025

lore
Share & tools
lore
#0 lore raw

Hello,

There are statements which can be connected with iterations.
https://en.cppreference.com/w/c/language/statements.html#Iteration_statements

Would you be looking for advanced possibilities to handle them in a general way?

How do you think about to use corresponding metavariable types for capturing headers (or footers) according to loop variations?

The semantic patch language supports the metavariable type “statement” to some degree.
There is a recurring data processing challenge to distinguish better between simple and compound statements, isn't it?

Would SmPL conjunctions become more helpful for such an use case?

Regards,
Markus