================
@@ -2697,6 +2698,70 @@ static void handleAvailabilityAttr(Sema &S, Decl *D, 
const ParsedAttr &AL) {
     }
   }
 
+  // Handle anyAppleOS specially: create implicit platform-specific attributes
----------------
tshortli wrote:

So I thought of a reason why the original attribute written in source should 
not be discarded - when Swift imports clang decls, we'd ideally like to be able 
to know whether it was written in source as `anyAppleOS` because in Swift, at 
least, this will change diagnostics. For example, we plan to make the fix-its 
generated for uses of potentially unavailable declarations suggest availability 
annotations that match the attributes on the declaration (e.g. the fix-it might 
suggest adding `if #available(anyAppleOS 26, *) {` instead of adding `if 
#available(macOS 26, *)`

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

Reply via email to