]> granicus.if.org Git - clang/commit
[Sema] Pop function scope when instantiating a func with skipped body
authorIlya Biryukov <ibiryukov@google.com>
Wed, 14 Mar 2018 13:18:30 +0000 (13:18 +0000)
committerIlya Biryukov <ibiryukov@google.com>
Wed, 14 Mar 2018 13:18:30 +0000 (13:18 +0000)
commit8367c1d3cfa90c76cb8fa149bdc01174c45c42b5
treeef98d563592e009fb775cd87be020b85b90f8807
parent5f4ef08259dc1312f8ad47203a3e6bbe52ab84b7
[Sema] Pop function scope when instantiating a func with skipped body

Summary:
By calling ActOnFinishFunctionBody(). Previously we were only calling
ActOnSkippedFunctionBody, which didn't pop the function scope.
This causes a crash when running on our internal code. No test-case,
though, since I couldn't come up with a small example in reasonable
time.

The bug was introduced in r321174.

Reviewers: bkramer, sammccall, sepavloff, aaron.ballman

Reviewed By: sammccall, aaron.ballman

Subscribers: aaron.ballman, cfe-commits

Differential Revision: https://reviews.llvm.org/D44439

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327504 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaTemplateInstantiateDecl.cpp