From 0c85860aba3cc223318003bded81ec183d0c1e22 Mon Sep 17 00:00:00 2001 From: Aotrix <9aotrix@protonmail.com> Date: Mon, 14 Sep 2026 19:32:05 +0200 Subject: Bind function argument to an identifier --- removeFunctionCall.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/removeFunctionCall.cpp b/removeFunctionCall.cpp index 2be2d9d..aca9adb 100644 --- a/removeFunctionCall.cpp +++ b/removeFunctionCall.cpp @@ -133,7 +133,8 @@ int main(int argc, // changeTo(node(ArgId), transformer::maybeDeref(ArgId))); auto functionToRemove = functionDecl(matchesName("configValue")); - auto Rule = makeRule(callExpr(callee(functionToRemove)), changeTo(cat("true"))); + auto Rule = makeRule(callExpr(hasArgument(0, expr().bind("keyName")), callee(functionToRemove)), + changeTo(cat("true"))); AtomicChanges AllChanges; -- cgit v1.2.3