================
@@ -4623,7 +4623,16 @@ def MSInheritance : InheritableAttr {
   let Spellings = [CustomKeyword<"__single_inheritance">,
                    CustomKeyword<"__multiple_inheritance">,
                    CustomKeyword<"__virtual_inheritance">,
-                   CustomKeyword<"__unspecified_inheritance">];
+                   CustomKeyword<"__unspecified_inheritance">,
+                   // The single underscore spellings are aliases defined in
+                   // TokenKinds.def; they must come *after* all of the other
+                   // spellings because otherwise the MSInheritanceModel
+                   // enumeration will break (we're relying on token
+                   // normalization converting the alias to the normal form).
+                   CustomKeyword<"_single_inheritance">,
+                   CustomKeyword<"_multiple_inheritance">,
+                   CustomKeyword<"_virtual_inheritance">
----------------
erichkeane wrote:

All of the infrastructure we have to do funny-business for attributes ends up 
getting sorta-applied to keywords.  At one point someone should examine 
everything our tablegen does and figure out which things we WANT for keywords 
(as well as every other comparison/etc interaction!).

That said... today is not that day :D  And given how few of these we have (and 
that this problem is really only cases where there are keywords for these 
things in a 'partially stripped' situation), I suspect this gets basically all 
of the bugs anyway.

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

Reply via email to