[clang-tools-extra] [clang][dataflow] Change `diagnoseFunction` to take type of diagnostic list instead of diagnostic itself. (PR #66014)

Yitzhak Mandelbaum via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 12 08:15:59 PDT 2023


ymand wrote:

> I think `llvm::SmallVector` makes sense for both callsites that currently exist (and ones that we might add in the future). This patch currently lets `UncheckedOptionalAccessCheck::check()` continue to use `std::vector`, but I think `llvm::SmallVector` makes sense there as well, as in the common case, we expect only a small number of diagnostics or none at all. This seems like it would be true for any function that wants to call `diagnoseFunction()` in the future as well.

FWIW, I also plan to followup with exactly that change to `UncheckedOptionalAccessCheck` -- I just didn't think it belonged grouped with this one.

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


More information about the cfe-commits mailing list