Teach libclang to be more careful around BlockDecls, and don't assume
that a TypeSourceInfo is always available, like we do everywhere else in libclang. Fixes <rdar://problem/9311140>. llvm-svn: 130034
This commit is contained in:
parent
dd450b86cf
commit
0ff2b2eda3
|
@ -582,8 +582,9 @@ bool CursorVisitor::VisitChildren(CXCursor Cursor) {
|
|||
}
|
||||
|
||||
bool CursorVisitor::VisitBlockDecl(BlockDecl *B) {
|
||||
if (Visit(B->getSignatureAsWritten()->getTypeLoc()))
|
||||
return true;
|
||||
if (TypeSourceInfo *TSInfo = B->getSignatureAsWritten())
|
||||
if (Visit(TSInfo->getTypeLoc()))
|
||||
return true;
|
||||
|
||||
if (Stmt *Body = B->getBody())
|
||||
return Visit(MakeCXCursor(Body, StmtParent, TU));
|
||||
|
|
Loading…
Reference in New Issue