[clang] [BoundsSafety][NFC] Introduce logic to replace the LateParsedAttrType placeholder with CountAttributedType (PR #212906)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 4 06:08:34 PDT 2026
erichkeane wrote:
> My open question is type identity. CountAttributedType::Profile currently keys on the CountExpr pointer, so incomplete nodes all profile identically (nullptr) and two fields with different counts would share a node — filling in one would clobber the other. Inserting into the folding set after the fact doesn't make much sense either, since nobody holds the key to look it up. The simplest solution might be not to unique these at all: given the pointer keying I'm not sure uniquing buys much here anyway — anyone rebuilding the type (instantiation, deserialization) arrives with a different Expr * and misses regardless. Does that match what you had in mind?
The secret I think would be to still do the Profile, but instead of 'filling in' the attribute when you complete it, you replace it. Not uniquing it is a solution, but I would like to avoid doing something particularly 'special' here?
https://github.com/llvm/llvm-project/pull/212906
More information about the cfe-commits
mailing list