]> granicus.if.org Git - clang/commit
[CodeGen] Handle __func__ inside __finally
authorShoaib Meenai <smeenai@fb.com>
Wed, 11 Apr 2018 18:17:35 +0000 (18:17 +0000)
committerShoaib Meenai <smeenai@fb.com>
Wed, 11 Apr 2018 18:17:35 +0000 (18:17 +0000)
commit4e48f60a11dbb80dfae45b20af007784a9c52f95
treefd2d4806967d0ee5277de67789aff90085d16676
parent70a212cc02636d2b3ac3ac173cb4300dedd49b62
[CodeGen] Handle __func__ inside __finally

When we enter a __finally block, the CGF's CurCodeDecl will be null
(because CodeGenFunction::StartFunction is given an empty GlobalDecl for
a __finally block), and so the dyn_cast here will result in an assertion
failure. Change it to dyn_cast_or_null to handle this case.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329836 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGExpr.cpp
test/CodeGen/exceptions-seh-finally.c