]> granicus.if.org Git - clang/commit
[CodeGen] Fix an assert in CodeGenFunction::EmitFunctionEpilog
authorAkira Hatanaka <ahatanaka@apple.com>
Wed, 17 Feb 2016 21:09:50 +0000 (21:09 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Wed, 17 Feb 2016 21:09:50 +0000 (21:09 +0000)
commit0add6aa837f9aeb2954009fe61921650b578e50c
treea6c6f04df9a37c7c6894da3f6283746742a2de24
parentdabe08aac070e30820506f5f6592196eedb74bbc
[CodeGen] Fix an assert in CodeGenFunction::EmitFunctionEpilog

The assert is triggered because isObjCRetainableType() is called on the
canonicalized return type that has been stripped of the typedefs and
attributes attached to it. To fix this assert, this commit gets the
original return type from CurCodeDecl or BlockInfo and uses it instead
of the canoicalized type.

rdar://problem/24470031

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261151 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGCall.cpp
test/CodeGenObjCXX/auto-release-result-assert.mm [new file with mode: 0644]