================ @@ -6037,13 +6038,24 @@ class AttributedType : public Type, public llvm::FoldingSetNode { private: friend class ASTContext; // ASTContext creates these + const Attr *Attribute; + QualType ModifiedType; QualType EquivalentType; AttributedType(QualType canon, attr::Kind attrKind, QualType modified, QualType equivalent) + : AttributedType(canon, attrKind, nullptr, modified, equivalent) {} + + AttributedType(QualType canon, const Attr *attr, QualType modified, + QualType equivalent); + +private: + AttributedType(QualType canon, attr::Kind attrKind, const Attr *attr, + QualType modified, QualType equivalent) : Type(Attributed, canon, equivalent->getDependence()), - ModifiedType(modified), EquivalentType(equivalent) { + Attribute(attr), ModifiedType(modified), + EquivalentType(equivalent) { AttributedTypeBits.AttrKind = attrKind; ---------------- erichkeane wrote:
I wouldn't expect that both are necessary here, and would rather we don't have the additional field, it is important that the two of these match, so at minimum I'd want an assert that they match (or a good example/explaination of why they WOULDN'T match). https://github.com/llvm/llvm-project/pull/108631 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits