[clang] [clang][AST] Add 'IgnoreTemplateParmDepth' to structural equivalence cache (PR #115518)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 11 10:34:01 PST 2024


https://github.com/NagyDonat commented:

> Another possible solution: Use two `NonEquivalentDecls` sets, one for `IgnoreTemplateParmDepth = true` and one for `false`. This may use less memory (no rarely used third value in the key) but requires more code changes.

I like this idea, and I think it can be implemented without significant code changes -- see my inline comments for details.

(Disclaimer: I didn't check my change so there might be other locations where you didn't need to change between the old "set of pairs" and your "set of 3-tuples", but the suggested "two sets of pairs in an array" would behave differently -- but it would be a simplification even if you needed one or two lines of additional logic.)

However the current "set of 3-tuples" approach is also OK if you prefer it.

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


More information about the cfe-commits mailing list