================
@@ -186,14 +186,14 @@ class AttributeCommonInfo {
   bool isGNUScope() const;
   bool isClangScope() const;
 
-  bool isCXX11Attribute() const { return SyntaxUsed == AS_CXX11 || IsAlignas; }
-
+  bool isAlignas() const { return IsAlignas; }
+  bool isCXX11Attribute() const { return SyntaxUsed == AS_CXX11; }
----------------
AaronBallman wrote:

This function was intended to tell you whether the attribute is a C++ 
attribute, and now it's changed to whether it's a C++ attribute spelled with 
`[[]]`. https://eel.is/c++draft/dcl.attr - note that `alignas` is an 
`attribute-specifier`. In C, `alignas` is *not* an attribute specifier (but it 
might become one someday) but is a kind of `declaration-specifier` instead.

I think it'd be better to keep this distinction, but I'll defer to @erichkeane 
if he has other opinions.

https://github.com/llvm/llvm-project/pull/65638
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to