diff options
| author | Aotrix <[email protected]> | 2026-10-07 23:15:26 +0200 |
|---|---|---|
| committer | Aotrix <[email protected]> | 2026-10-07 23:15:26 +0200 |
| commit | f718fda87eaf4a7faadf49222b1c202848f49656 (patch) | |
| tree | 0495094bc79722f1c1a88c7ff9eb61e2ba72f959 /removeFunctionCall.cpp | |
| parent | d72983996f30ee785cca9f66eeea598a2432744e (diff) | |
Diffstat (limited to 'removeFunctionCall.cpp')
| -rw-r--r-- | removeFunctionCall.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/removeFunctionCall.cpp b/removeFunctionCall.cpp index 8f62818..ff871bb 100644 --- a/removeFunctionCall.cpp +++ b/removeFunctionCall.cpp @@ -90,6 +90,7 @@ AST_POLYMORPHIC_MATCHER_P2(hasVariableNameArgument, if (!Node.getNumArgs()) return false; const Expr* Arg = Node.getArg(0); + std::cout << "[DEBUG] hasVariableNameArgument; VariableName: " << VariableName << '\n'; if (Finder->isTraversalIgnoringImplicitNodes() && isa<CXXDefaultArgExpr>(Arg)) return false; return InnerMatcher.matches(*Arg->IgnoreParenImpCasts(), Finder, Builder); @@ -108,6 +109,7 @@ AST_POLYMORPHIC_MATCHER_P2(hasExpectedValueArgument, if (Node.getNumArgs() > 2) return false; const Expr* Arg = Node.getArg(1); + std::cout << "[DEBUG] hasExpectedValueArgument; ExpectedValue: " << ExpectedValue << '\n'; if (Finder->isTraversalIgnoringImplicitNodes() && isa<CXXDefaultArgExpr>(Arg)) return false; return InnerMatcher.matches(*Arg->IgnoreParenImpCasts(), Finder, Builder); @@ -184,8 +186,8 @@ int main(int argc, // for instance if there is a ternary operator somewhere... const std::string FunctionReturnValue("true"); auto Rule = makeRule(callExpr(callee(FunctionToRemove), - hasVariableNameArgument("ohThisIsTheVariableName", expr()), - hasExpectedValueArgument("ohTheExpectedValueIsThis", expr())), + hasVariableNameArgument("LightVariableName", expr()), + hasExpectedValueArgument("on", expr())), transformer::changeTo(cat(FunctionReturnValue))); AtomicChanges AllChanges; |
