Clang: Ensure that an unparsed translation unit is not suspended

Currently this might happen when registerTranslationUnitsForEditor is
called with visible documents that are not the ones that are registered.

Change-Id: I9ae5f75c8bbff6a11161a3387633726066001062
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Nikolai Kosjar
2017-08-22 14:51:34 +02:00
parent eb74f5b71e
commit 024cfda06c
4 changed files with 35 additions and 1 deletions

View File

@@ -97,7 +97,8 @@ static bool isSuspendable(const Document &document)
{
return isFineDocument(document)
&& !document.isSuspended()
&& !document.isVisibleInEditor();
&& !document.isVisibleInEditor()
&& document.isParsed();
}
static bool isResumable(const Document &document)