[clang] 5794ea4 - [Sema] Fix _Alignas/isCXX11Attribute() FIXME
Richard Sandiford via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 26 01:49:50 PDT 2023
Author: Richard Sandiford
Date: 2023-04-26T09:49:07+01:00
New Revision: 5794ea421a0d60802141a9f289cd2c9fa8f7416c
URL: https://github.com/llvm/llvm-project/commit/5794ea421a0d60802141a9f289cd2c9fa8f7416c
DIFF: https://github.com/llvm/llvm-project/commit/5794ea421a0d60802141a9f289cd2c9fa8f7416c.diff
LOG: [Sema] Fix _Alignas/isCXX11Attribute() FIXME
When doing https://reviews.llvm.org/D148105 , I hadn't noticed that
there was also a FIXME about the misclassification of _Alignas in
ProcessDeclAttribute.
Differential Revision: https://reviews.llvm.org/D149148
Added:
Modified:
clang/lib/Sema/SemaDeclAttr.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index 2517dd501efe8..3cb3250f67318 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -8591,13 +8591,7 @@ ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL,
// Ignore C++11 attributes on declarator chunks: they appertain to the type
// instead.
- // FIXME: We currently check the attribute syntax directly instead of using
- // isCXX11Attribute(), which currently erroneously classifies the C11
- // `_Alignas` attribute as a C++11 attribute. `_Alignas` can appear on the
- // `DeclSpec`, so we need to let it through here to make sure it is processed
- // appropriately. Once the behavior of isCXX11Attribute() is fixed, we can
- // go back to using that here.
- if (AL.getSyntax() == ParsedAttr::AS_CXX11 && !Options.IncludeCXX11Attributes)
+ if (AL.isCXX11Attribute() && !Options.IncludeCXX11Attributes)
return;
// Unknown attributes are automatically warned on. Target-specific attributes
More information about the cfe-commits
mailing list