[SemaObjC] Do not RebuildObjCMessageExpr without valid method decl
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Mon, 22 Aug 2016 21:50:22 +0000 (21:50 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Mon, 22 Aug 2016 21:50:22 +0000 (21:50 +0000)
commit25f02cfc52c7adfa76a45bc6a8063a675a5e6c5d
tree480a8b3d71f8457d1b2c43adad67be47921f508d
parentcc3dd629eedb3b5a4f74bf2e0c3729c211d79df7
[SemaObjC] Do not RebuildObjCMessageExpr without valid method decl

Fix crash-on-invalid in ObjC Sema by avoiding to rebuild a message
expression to a 'super' class in case the method to call does not exist
(i.e. comes from another missing identifier).

In this case, the typo transform is invoked upon the message expression
in an attempt to solve a typo in a 'super' call parameters, but it
crashes since it assumes the method to call has a valid declaration.

rdar://problem/27305403

llvm-svn: 279481
clang/lib/Sema/TreeTransform.h
clang/test/SemaObjC/call-super-2.m