ccotter wrote:

Thanks both @nicovank @5chmidti for the overlapping reviews. I got sidetracked, 
but am coming back to hopefully finish this up.

Re: supporting more use cases, I found nearly all bugs in our codebase were of 
the simple form `sprintf(a, "", ..., a, ...)` with a simple DeclRefExpr. None 
were of the form `sprintf(a[0][0], "", ..., a[0][0], ...)` (at least, none that 
I couple find with a more naive `grep` and visual inspection), or anything else 
suggested above. And, since matching on other expressions more generically like 
more deeply nested arrays or `(buf+10)` led to more complex matchers, I opted 
for the simpler cases my check can find in its current form.

Let me look at `utils::areStatementsIdentical` to see if this could help expand 
the forms that the tool can find.

https://github.com/llvm/llvm-project/pull/114244
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to