================ @@ -5125,24 +5127,54 @@ QualType ASTContext::getUnresolvedUsingType( QualType ASTContext::getAttributedType(attr::Kind attrKind, QualType modifiedType, - QualType equivalentType) const { + QualType equivalentType, + const Attr *attr) const { llvm::FoldingSetNodeID id; AttributedType::Profile(id, attrKind, modifiedType, equivalentType); ---------------- hnrklssn wrote:
`AttributedType` is uniqued based on `attrKind`, but not `attr`. So calling this function may return a type with a pointer to a different `Attr` (although of the same kind). Is this a problem? Do we want to fully unique `AttributedType` based on it's `Attr*`? The other option I believe is to fetch the `Attr*` from `AttributedTypeLoc` (which you can get through the `TypeSourceInfo` from `Decl` or `ExplicitCastExpr`) rather than the `AttributedType`, but doing that for generic expressions gets quite hairy. 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