forked from OSchip/llvm-project
Instantiate attributes on typedefs. This is a quick fix for PR7148,
when we really need a proper audit of our handling of attributes in templates. llvm-svn: 103999
This commit is contained in:
parent
93d8844699
commit
96cdb1590e
|
@ -217,6 +217,7 @@ Decl *TemplateDeclInstantiator::VisitTypedefDecl(TypedefDecl *D) {
|
|||
Typedef->setPreviousDeclaration(cast<TypedefDecl>(InstPrev));
|
||||
}
|
||||
|
||||
InstantiateAttrs(D, Typedef);
|
||||
|
||||
Typedef->setAccess(D->getAccess());
|
||||
Owner->addDecl(Typedef);
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
template <typename T>
|
||||
struct A {
|
||||
char a __attribute__((aligned(16)));
|
||||
|
||||
struct B {
|
||||
typedef T __attribute__((aligned(16))) i16;
|
||||
i16 x;
|
||||
};
|
||||
};
|
||||
int a[sizeof(A<int>) == 16 ? 1 : -1];
|
||||
int a2[sizeof(A<int>::B) == 16 ? 1 : -1];
|
||||
|
||||
|
|
Loading…
Reference in New Issue