mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-13 19:24:21 +00:00
Fix CIndex crash on invalid code reported in <rdar://problem/7833619>.
llvm-svn: 100589
This commit is contained in:
parent
ea7a133775
commit
6ca136a77f
4
clang/test/Index/invalid-code-rdar_7833619.m
Normal file
4
clang/test/Index/invalid-code-rdar_7833619.m
Normal file
@ -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,7 +814,8 @@ bool CursorVisitor::VisitFunctionTypeLoc(FunctionTypeLoc TL) {
|
||||
return true;
|
||||
|
||||
for (unsigned I = 0, N = TL.getNumArgs(); I != N; ++I)
|
||||
if (Visit(MakeCXCursor(TL.getArg(I), TU)))
|
||||
if (Decl *D = TL.getArg(I))
|
||||
if (Visit(MakeCXCursor(D, TU)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user