[PATCH] D23895: [ms] Add support for parsing uuid as a MS attribute

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 1 17:39:36 PDT 2016


aaron.ballman added inline comments.

================
Comment at: include/clang/Basic/Attr.td:201
@@ -200,2 +200,3 @@
 class Declspec<string name> : Spelling<name, "Declspec">;
+class Microsoft<string name> : Spelling<name, "Microsoft">;
 class CXX11<string namespace, string name, int version = 1>
----------------
aaron.ballman wrote:
> thakis wrote:
> > rsmith wrote:
> > > Given that MS have deprecated this syntax and are trying to move away from it towards `__declspec`, I think calling this "Microsoft" is a mistake. As MS' documentation calls these "ATL attributes", it would seem reasonable for us to do the same.
> > As said upthread, I'm happy to rename this to whatever you all agree on (or what you decree given that you're code owner), but they are called Microsoft attributes in today's code already, and renaming that is unrelated to this CL. If you think it's important, I'm happy to rename the existing code before lading this CL and then using the new name in this CL immediately.
> > 
> > Re "ATL attributes": I think some of the attributes in [] are SAL attributes which as far as I know is independent of ATL. Are you sure the documentation refers to the [] syntax, or could it refer to specific attributes in that syntax?
> MS' documentation does not call them "ATL attributes" only. The documentation also calls them COM attributes, compiler attributes, and other names. However, the compiler diagnoses them as "usage of ATL attributes is deprecated", so it's somewhat defensible as a name.
> 
> I think "ATL" is the wrong name for them *only here*, but I'm not opposed to making a sweeping change to name them ATL attributes everywhere in the compiler (including here). However, I also don't see an issue with continuing to call them Microsoft attributes, either, because it's unlikely to cause any lasting confusion (it's caused zero confusion in the years I've been working on Clang).
It seems that the "usage of ATL attributes is deprecated" means attributes appertaining to ATL functionality are deprecated, not that the attribute syntax is "ATL attribute" syntax which is deprecated. For instance, SAL attributes can be used and no diagnostic is emitted. Based on that, I think calling them ATL attributes is definitely incorrect.


https://reviews.llvm.org/D23895





More information about the cfe-commits mailing list