[PATCH] D23096: [Sema] Pass CombineWithOuterScope = true to constructor of LocalInstantiationScope
Akira Hatanaka via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 23 14:39:15 PDT 2016
ahatanak updated this revision to Diff 72356.
ahatanak added a comment.
I agree that extending the logic of getTemplateInstantiationArgs seems like a better approach. I changed Sema::getTemplateInstantiationArgs to search for the template arguments twice, first for the initializer's template arguments and then for the VarTemplateSpecializationDecl. This should enable handling cases where a variable template is declared inside a class/struct.
I wonder whether VarTemplateSpecializationDecl can be made a subclass of DeclContext and have it contain the lambda class of the initializer. I think that will simplify the logic of getTemplateInstantiationArgs.
https://reviews.llvm.org/D23096
Files:
include/clang/Sema/Sema.h
lib/Sema/Sema.cpp
lib/Sema/SemaTemplate.cpp
lib/Sema/SemaTemplateInstantiate.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp
test/SemaCXX/vartemplate-lambda.cpp
test/SemaTemplate/default-expr-arguments-3.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23096.72356.patch
Type: text/x-patch
Size: 12389 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160923/a5a99dcc/attachment.bin>
More information about the cfe-commits
mailing list