]> granicus.if.org Git - clang/commit
[CodeComplete] Fix crash when completing ObjC block parameter with a broken type
authorSam McCall <sam.mccall@gmail.com>
Thu, 4 Apr 2019 11:34:18 +0000 (11:34 +0000)
committerSam McCall <sam.mccall@gmail.com>
Thu, 4 Apr 2019 11:34:18 +0000 (11:34 +0000)
commit74cc5ad2f8c2a78a5fea4b56e872f6c1cb70b67f
tree05d2a2ed01003ddc554b9efe64cc7741f36362c9
parenta009ce58cfce26d389ff3ac49228a921950ced27
[CodeComplete] Fix crash when completing ObjC block parameter with a broken type

Summary:
The fix isn't great, but it's hard to fix properly because the completion
code sensibly uses ParmVarDecl to represent parameters, but the AST-building
code sensibly doesn't synthesize them if the type is broken.
Also this case is apparently really rare, so it's probably not worth bending
over backwards for.

Reviewers: ilya-biryukov

Subscribers: javed.absar, kristof.beyls, arphaman, cfe-commits

Tags: #clang

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357686 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaCodeComplete.cpp
test/Index/complete-blocks.m