]> granicus.if.org Git - clang/commit
[MS] Push fewer DeclContexts for delayed template parsing
authorReid Kleckner <rnk@google.com>
Tue, 27 Nov 2018 02:21:51 +0000 (02:21 +0000)
committerReid Kleckner <rnk@google.com>
Tue, 27 Nov 2018 02:21:51 +0000 (02:21 +0000)
commit39c3aadd7d2a166b6a0d698be33f185020b9ab22
treeea3c049e4f72ae5fb5eea1b20733d1ef3e246164
parentd1783a984e4596ee929012680e902883518881e6
[MS] Push fewer DeclContexts for delayed template parsing

Only push the outermost record as a DeclContext when parsing a function
body. See the comments in Sema::getContainingDC about the way the parser
pushes contexts. This is intended to match the behavior the parser
normally displays where it parses all method bodies from all nested
classes at the end of the outermost class, when all nested classes are
complete.

Fixes PR38460.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347627 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Parse/ParseTemplate.cpp
test/Parser/DelayedTemplateParsing.cpp