Bug Fixes in Development Tools
Fix deadlock while parsing projects with deep include trees.
This complicates the code quite a bit, but I could not come up
with anything simpler.
We create a sorted list of includes by depth and traverse that
in a depth-first manner. Furthermore we remember what files are
imported in which files and ensure that these imports are available
when parsing a file as otherwise include guards and cyclic references
would break or lead to infinite recursions.
For every file or import we set the UrlParseLock and check whether
the DUChain information is up to date. If not, we traverse the whole
translation unit and look for any declarations that belong to the
This ensures we never nest the UrlParseLocks and thus should not