Can you show use the code corresponding to the CallExpr?
Also, when you say the “name of the first argument supplied…” that presumes that the first argument is always a variable. That’s not generally the case – any (well typed) argument will work. For example, your first argument in the dumped CallExpr above is pointer-dereference (I think *valueString?). So, you would, at the least, want your code to be
if (const auto *dr = clang::dyn_castclang::DeclRefExpr(expr->getArg(0))) {
auto name = dr->getDecl()->getName().str();
…
}
That said, you probably want expr->IgnoringImplicit(), since lvalues (e.g. variable names) are always implicitly cast to rvalues.