diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -5020,6 +5020,7 @@ /*BitWidth=*/nullptr, /*Mutable=*/false, /*InitStyle=*/ICIS_NoInit); Anon->setAccess(AS); + ProcessDeclAttributes(S,Anon,Dc); if (getLangOpts().CPlusPlus) FieldCollector->Add(cast(Anon)); } else { diff --git a/clang/test/AST/pr43983.cpp b/clang/test/AST/pr43983.cpp new file mode 100644 --- /dev/null +++ b/clang/test/AST/pr43983.cpp @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -fsyntax-only %s -std=c++11 -ast-dump | FileCheck %s + +struct B { _Alignas(64) struct { int b; }; }; + +// CHECK: AlignedAttr {{.*}} _Alignas +// CHECK: ConstantExpr {{.*}} 64 +// CHECK: IntegerLiteral {{.*}} 64