[llvm] [clang-tools-extra] [clang] [analyzer] Trust base to derived casts for dynamic types (PR #69057)

Tom Ritter via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 2 07:35:42 PST 2024


tomrittervg wrote:

> However, what should we do if multiple (N) classes implement Base? Trying each N, and basically splitting the state to (N+1) ways is not going to scale. Unless N is of course really small, like 2 or 3 at most.

That's kind of what I imagined - try them all.  The Analyzer has a built-in timeout mechanism that will come into play.  

If you wanted to be fancy, there could be an obscure config option, with a default of N=3.  If config value is not set, and N>3 it asserts, alerting the user to the situation. If config value is set, it limits to analyzing the first N.

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


More information about the cfe-commits mailing list