]> granicus.if.org Git - clang/commit
Check if 'Unit' is NULL before trying to iterate over the diagnostics.
authorTed Kremenek <kremenek@apple.com>
Fri, 5 Mar 2010 22:43:29 +0000 (22:43 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 5 Mar 2010 22:43:29 +0000 (22:43 +0000)
commit34f6a322430e2cdcb38167781eb848b9b8e928bb
treee2a367b07967ed43da883909a8a4b747d60c41d3
parent0baa95200b634cc55185489cea5d11b10edefb7d
Check if 'Unit' is NULL before trying to iterate over the diagnostics.
This obviates a null dereference that can occur when 'NumErrors'
is not zero.

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