[clang] [analyzer] Refactor CallDescription match mode (NFC) (PR #83432)

Endre Fülöp via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 4 06:30:17 PST 2024


gamesh411 wrote:

> > The flag approach can probably make a sense for namespace handling (match the exact specified namespace, or allow a prefix before, or even something in between).
> 
> Even in that case, I'd prefer a separate second parameter (that's either boolean or a different `enum`). Squeezing unrelated things into the same flag only makes sense if (1) memory use is strongly limited (2) there would be too many separate parameters.

I lean towards the separate enum for the namespace handling scenario even if it means adding another enum to the constructor, or maybe packing the two enums into a configuration object because these are separate concerns.
I left a suggestion inline as well, but otherwise, LGTM.

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


More information about the cfe-commits mailing list