diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2012-06-19 13:49:26 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2012-06-19 13:49:26 +0000 |
commit | ed35fd1c6db1680b4526ba64c94e5da6ec203be7 (patch) | |
tree | 18ac8c2240de3141ff98114ea78325435b42ab93 /lib/Sema/SemaTemplateInstantiateDecl.cpp | |
parent | c20c4e79ae1957ec5a88d7653a0aeda24b67ae3a (diff) |
Improves parsing and semantic analysis for MS __declspec attributes. This includes support for the align (which fixes PR12631).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158717 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiateDecl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index 662b3025af..d4b5ffe517 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -79,14 +79,16 @@ void Sema::InstantiateAttrs(const MultiLevelTemplateArgumentList &TemplateArgs, ExprResult Result = SubstExpr(Aligned->getAlignmentExpr(), TemplateArgs); if (!Result.isInvalid()) - AddAlignedAttr(Aligned->getLocation(), New, Result.takeAs<Expr>()); + AddAlignedAttr(Aligned->getLocation(), New, Result.takeAs<Expr>(), + Aligned->getIsMSDeclSpec()); } else { TypeSourceInfo *Result = SubstType(Aligned->getAlignmentType(), TemplateArgs, Aligned->getLocation(), DeclarationName()); if (Result) - AddAlignedAttr(Aligned->getLocation(), New, Result); + AddAlignedAttr(Aligned->getLocation(), New, Result, + Aligned->getIsMSDeclSpec()); } continue; } |