Semgrep started off as a “syntactic grep” but has increasingly become more semantic. So if you want to find all calls to foo that have 1 as the first argument, you just search for foo(1) and even things like x = 1; foo(x); will match.
Here’s an elaborate example: https://semgrep.dev/s/ievans:c-dataflow