[RFC] Referencing local variables with SmPL?

From: Markus Elfring

Date: Mon Sep 21 2026 - 02:40:04 EST


Hello,

Declarations (and definitions) of local variables tend to be required
for various control flows.
https://en.cppreference.com/c/language/declarations

Function implementations can occasionally use multiple variables with different scopes.
https://github.com/coccinelle/coccinelle/issues/322

Thus it seems to be challenging to refer to relevant data specifications
in a consistent way for source code search and transformation approaches also
by the means of the semantic patch language.
How will corresponding development ideas evolve?

Regards,
Markus