================
@@ -0,0 +1,8 @@
+// Mimics a class like UTType that has availability attrs for multiple 
platforms.
+// The 'macos' attr comes before 'ios', so getAttr<AvailabilityAttr>() returns
+// 'macos' first. When mergeInheritableAttributes copies only the first attr
+// across PCM boundaries, the 'ios' attr is lost on the @class redeclaration.
----------------
vsapsai wrote:

We have a chain of calls `mergeDeclAttributes` -> `mergeDeclAttribute` -> 
`mergeAvailabilityAttr`. And in SemaDeclObjC.cpp we call `mergeDeclAttributes` 
in `ActOnStartClassInterface` and `ActOnForwardClassDeclaration`. I haven't 
investigated the logic carefully but I think the bug is in not propagating or 
merging availability attribute properly.

https://github.com/llvm/llvm-project/pull/181482
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to