зеркало из https://github.com/microsoft/clang.git
Fix CIndex crash on invalid code reported in <rdar://problem/7833619>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100589 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
e9f5581ad4
Коммит
5dbacb4179
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче