Skip to content

Commit

Permalink
[Sema] Fix _Alignas/isCXX11Attribute() FIXME
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rsandifo-arm committed Apr 26, 2023
1 parent 08f0725 commit 5794ea4
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions clang/lib/Sema/SemaDeclAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5794ea4

Please sign in to comment.