]> granicus.if.org Git - clang/commit
Combine instantiation context of field initializer with context of class.
authorSerge Pavlov <sepavloff@gmail.com>
Tue, 28 Apr 2015 17:58:47 +0000 (17:58 +0000)
committerSerge Pavlov <sepavloff@gmail.com>
Tue, 28 Apr 2015 17:58:47 +0000 (17:58 +0000)
commit59e3013d8496484e00bfd097713e95d1809f9226
treebaecfb2b3954c966f627172c866ae5a7483b451d
parent7aad3bedb20b9c0d53f8695f8b4de742b33e3666
Combine instantiation context of field initializer with context of class.

Inclass initializer is instantiated in its own LocalInstantiationScope. It
causes problems when instantiating local classes - when instantiation scope
is searched for DeclContext of the field, the search fails. As a solution,
the instantiation scope of field initializer is combined with its outer
scope.

This patch fixes PR23194.

Differential Revision: http://reviews.llvm.org/D9258

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236005 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaTemplateInstantiate.cpp
test/SemaTemplate/instantiate-local-class.cpp