diff options
| author | David Blaikie <dblaikie@gmail.com> | 2019-04-19 23:04:05 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2019-04-19 23:04:05 +0000 |
| commit | 07489f9ccf4acb87f43e4f154f92ebd36e2d66d3 (patch) | |
| tree | ffdf177e6f77ba9f93c2c4e821272a8edf77529a /clang/lib/AST/DeclTemplate.cpp | |
| parent | aa3bf6ce721dc9531f52b84e93b6ad182517561b (diff) | |
| download | bcm5719-llvm-07489f9ccf4acb87f43e4f154f92ebd36e2d66d3.tar.gz bcm5719-llvm-07489f9ccf4acb87f43e4f154f92ebd36e2d66d3.zip | |
Modules: Adopt template parameters for variable templates to set their decl context correctly
Exposed by a related bug about visibility of default arguments of nested
templates - without the correct decl context, default template
parameters of variable templates nested in classes would have incorrect
visibility computed.
llvm-svn: 358796
Diffstat (limited to 'clang/lib/AST/DeclTemplate.cpp')
| -rw-r--r-- | clang/lib/AST/DeclTemplate.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclTemplate.cpp b/clang/lib/AST/DeclTemplate.cpp index 2055c799e7a..592258d3ffb 100644 --- a/clang/lib/AST/DeclTemplate.cpp +++ b/clang/lib/AST/DeclTemplate.cpp @@ -956,6 +956,7 @@ VarTemplateDecl *VarTemplateDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, DeclarationName Name, TemplateParameterList *Params, VarDecl *Decl) { + AdoptTemplateParameterList(Params, DC); return new (C, DC) VarTemplateDecl(C, DC, L, Name, Params, Decl); } |

