]> granicus.if.org Git - clang/commitdiff
[libclang] Add a null check in CursorVisitor::visitPreprocessedEntities.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 7 May 2013 20:37:17 +0000 (20:37 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 7 May 2013 20:37:17 +0000 (20:37 +0000)
rdar://13680583

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181352 91177308-0d34-0410-b5e6-96231b3b80d8

tools/libclang/CIndex.cpp

index a43c1ab7e45914848b5a52bedcf01af875fbcc41..c25e625df5b5cabae5bbeee1413c6c051f423e4c 100644 (file)
@@ -426,6 +426,9 @@ bool CursorVisitor::visitPreprocessedEntities(InputIterator First,
       continue;
 
     PreprocessedEntity *PPE = *First;
+    if (!PPE)
+      continue;
+
     if (MacroExpansion *ME = dyn_cast<MacroExpansion>(PPE)) {
       if (Visit(MakeMacroExpansionCursor(ME, TU)))
         return true;