diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-02-10 02:02:21 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-02-10 02:02:21 +0000 |
commit | 572ae0a32ece4bd7ea24e3d8f9bfe3e11aa26414 (patch) | |
tree | 29dbc0d0bf7570937ac4edef4260c0c93f64f29b /lib/Sema/SemaTemplate.cpp | |
parent | f8b1c316cb294d4d47579fbdf7d97d3260e2ba6e (diff) |
Make sure we convert struct layout pragmas to attributes for class templates the same way we do for non-template classes. <rdar://problem/10791194>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150221 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index ca34ada132..af2c6efdff 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -1023,6 +1023,11 @@ Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK, NumOuterTemplateParamLists, OuterTemplateParamLists); + // Add alignment attributes if necessary; these attributes are checked when + // the ASTContext lays out the structure. + AddAlignmentAttributesForRecord(NewClass); + AddMsStructLayoutForRecord(NewClass); + ClassTemplateDecl *NewTemplate = ClassTemplateDecl::Create(Context, SemanticContext, NameLoc, DeclarationName(Name), TemplateParams, |