diff options
author | DeLesley Hutchins <delesley@google.com> | 2012-01-20 22:37:06 +0000 |
---|---|---|
committer | DeLesley Hutchins <delesley@google.com> | 2012-01-20 22:37:06 +0000 |
commit | 7b9ff0c09025dcbe48ec7db71330e2066d1e1863 (patch) | |
tree | c8faa7b24c1bd0e9a2bf4190e067a852ff8c31b0 /lib/Sema/SemaDecl.cpp | |
parent | ef1440b6eca118d46291166ce3302f9bba8e639b (diff) |
Instantiate dependent attributes when instantiating templates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148592 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 9dc00c3625..7fd10735b7 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -7311,6 +7311,9 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, /// relevant Decl. void Sema::ActOnFinishDelayedAttribute(Scope *S, Decl *D, ParsedAttributes &Attrs) { + // Always attach attributes to the underlying decl. + if (TemplateDecl *TD = dyn_cast<TemplateDecl>(D)) + D = TD->getTemplatedDecl(); ProcessDeclAttributeList(S, D, Attrs.getList()); } |