aaron.ballman added a comment.

I think the documentation for the attribute should be updated to explain this 
new behavior, otherwise this will be a very inexplicable feature to users.

One question I have is: will this feature also be needed by other attributes? 
This seems like a somewhat general problem between explicit attributes, 
implicit attributes, and attributes added via the pragma. It might not be worth 
generalizing yet, but I'm curious to know whether we'll need this for things 
like visibility and type_visibility as well.



================
Comment at: include/clang/Sema/Sema.h:2467
+  /// already has an availability attribute with a lower priority for the
+  /// specified platform.
+  enum AvailabilityPriority : int {
----------------
We should have a comment somewhere (perhaps here) that makes it clear that the 
priorities we calculate and store on the semantic attribute object are not 
expected to match values in this enumeration, but instead be treated as a plain 
integer value. This enumeration is just giving a name to some of the addends 
used to calculate that value.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56892/new/

https://reviews.llvm.org/D56892



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to