[clang] [analyzer]:fix valistChecker false negative in windows platform (PR #72951)

via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 21 07:15:31 PST 2023


DonatNagyE wrote:

In fact, as I think about this, I realized that it's probably a bad idea to perform "initialization" for each `va_list` variable in a `check::PreStmt<DeclStmt>` callback -- e.g. because in theory the programmer could write code like
```
void f(int fst, ...) {
  va_list *pva = (va_list *)malloc(sizeof(va_list));
  va_start(*pva, fst);
  /* use and release the va_list */
  free(pva);
}
```



https://github.com/llvm/llvm-project/pull/72951


More information about the cfe-commits mailing list