[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 11 06:58:08 PDT 2023
================
@@ -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; }
bool isC23Attribute() const { return SyntaxUsed == AS_C23; }
/// The attribute is spelled [[]] in either C or C++ mode, including standard
/// attributes spelled with a keyword, like alignas.
bool isStandardAttributeSyntax() const {
- return isCXX11Attribute() || isC23Attribute();
+ return isCXX11Attribute() || isC23Attribute() || IsAlignas;
----------------
erichkeane wrote:
So THIS one I definitely think shouldn't change. BUT this shows another situation where `isCXX11Attribute` is being misused.
https://github.com/llvm/llvm-project/pull/65638
More information about the cfe-commits
mailing list