forked from OSchip/llvm-project
Check if an IdentifierInfo* is null when the FunctionDecl isn't a simple C function.
Fixes <rdar://problem/12355298> llvm-svn: 164988
This commit is contained in:
parent
01f63b950c
commit
b67c6cc24d
|
@ -5510,8 +5510,12 @@ static Expr *findCapturingExpr(Sema &S, Expr *e, RetainCycleOwner &owner) {
|
|||
} else if (CallExpr *CE = dyn_cast<CallExpr>(e)) {
|
||||
if (CE->getNumArgs() == 1) {
|
||||
FunctionDecl *Fn = dyn_cast_or_null<FunctionDecl>(CE->getCalleeDecl());
|
||||
if (Fn && Fn->getIdentifier()->isStr("_Block_copy"))
|
||||
e = CE->getArg(0)->IgnoreParenCasts();
|
||||
if (Fn) {
|
||||
const IdentifierInfo *FnI = Fn->getIdentifier();
|
||||
if (FnI && FnI->isStr("_Block_copy")) {
|
||||
e = CE->getArg(0)->IgnoreParenCasts();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue