summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAotrix <[email protected]>2026-09-14 19:32:05 +0200
committerAotrix <[email protected]>2026-09-14 19:32:05 +0200
commit0c85860aba3cc223318003bded81ec183d0c1e22 (patch)
treebf1e3b091f81669d644dc7ca96b6ed62791ba372
parent947f7476325f87e9b366acf69f2a0a2671fa4811 (diff)
Bind function argument to an identifier
-rw-r--r--removeFunctionCall.cpp3
1 files changed, 2 insertions, 1 deletions
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;