aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-01-29 04:21:28 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-01-29 04:21:28 +0000
commit8f3aacc8c4849c9e0e7a236954725fffdeb917a6 (patch)
tree61615d1ddb984732449d2ffca43acd8d7960748f /lib/Sema/SemaTemplateInstantiateDecl.cpp
parent8338a9d28c4a9d06b19b1c5df51e70182914e2df (diff)
Propagate the spelling list index for an attribute across template instantiation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173768 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index b679d49215..f5405ff383 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -80,15 +80,17 @@ void Sema::InstantiateAttrs(const MultiLevelTemplateArgumentList &TemplateArgs,
TemplateArgs);
if (!Result.isInvalid())
AddAlignedAttr(Aligned->getLocation(), New, Result.takeAs<Expr>(),
- Aligned->getIsMSDeclSpec());
+ Aligned->getIsMSDeclSpec(),
+ Aligned->getSpellingListIndex());
} else {
TypeSourceInfo *Result = SubstType(Aligned->getAlignmentType(),
TemplateArgs,
Aligned->getLocation(),
DeclarationName());
if (Result)
- AddAlignedAttr(Aligned->getLocation(), New, Result,
- Aligned->getIsMSDeclSpec());
+ AddAlignedAttr(Aligned->getLocation(), New, Result,
+ Aligned->getIsMSDeclSpec(),
+ Aligned->getSpellingListIndex());
}
continue;
}