forked from OSchip/llvm-project
Fix CIndex crash on invalid code reported in <rdar://problem/7833619>.
llvm-svn: 100589
This commit is contained in:
parent
ea7a133775
commit
6ca136a77f
|
@ -0,0 +1,4 @@
|
||||||
|
// RUN: c-index-test -test-load-source all %s
|
||||||
|
// All we care about in this test is that it doesn't crash.
|
||||||
|
typedef r7833619_a (*r7833619_b)(r7833619_c *r7833619_d, r7833619_c *r7833619_e);
|
||||||
|
|
|
@ -814,8 +814,9 @@ bool CursorVisitor::VisitFunctionTypeLoc(FunctionTypeLoc TL) {
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
for (unsigned I = 0, N = TL.getNumArgs(); I != N; ++I)
|
for (unsigned I = 0, N = TL.getNumArgs(); I != N; ++I)
|
||||||
if (Visit(MakeCXCursor(TL.getArg(I), TU)))
|
if (Decl *D = TL.getArg(I))
|
||||||
return true;
|
if (Visit(MakeCXCursor(D, TU)))
|
||||||
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue