[PATCH] D87853: [SemaTemplate] Stop passing insertion position around during VarTemplate instantiation

Bruno Cardoso Lopes via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 21 23:38:27 PDT 2020


bruno updated this revision to Diff 293351.
bruno retitled this revision from "[Sema] Update specialization iterator after template argument deduction." to "[SemaTemplate] Stop passing insertion position around during VarTemplate instantiation".
bruno edited the summary of this revision.
bruno added a comment.

Hi Richard. Thanks for the quick feedback and for the testcase!

The updated patch implements your suggestions. `BuildVariableInstantiation` seems to cover for `MergeVarDecl` however it doesn't seem to be enough for `InstantiateVariableInitializer` (breaks several tests) most likely because `InstantiatingSpecFromTemplate` prevents it to be called in `BuildVariableInstantiation`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87853/new/

https://reviews.llvm.org/D87853

Files:
  clang/include/clang/Sema/Sema.h
  clang/include/clang/Sema/Template.h
  clang/lib/Sema/SemaTemplate.cpp
  clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
  clang/test/SemaTemplate/instantiate-var-template.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87853.293351.patch
Type: text/x-patch
Size: 5619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200922/83d82db7/attachment.bin>


More information about the cfe-commits mailing list