Commit 74e24084 authored by Marco Bubke's avatar Marco Bubke

Clang: Workaround for clang bug to gather inclusions

We have to revert it if the fix is going in.

Change-Id: I28418e6c7cf6c40afdb5025eb1a52c13a0aa1302
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
parent d041a79a
......@@ -316,11 +316,16 @@ UnsavedFiles &TranslationUnit::unsavedFiles() const
void TranslationUnit::updateIncludeFilePaths() const
{
auto oldDependedFilePaths = d->dependedFilePaths;
d->dependedFilePaths.clear();
d->dependedFilePaths.insert(filePath());
clang_getInclusions(d->translationUnit, includeCallback, const_cast<TranslationUnit*>(this));
if (d->dependedFilePaths.size() == 1)
d->dependedFilePaths = oldDependedFilePaths;
d->translationUnits.addWatchedFiles(d->dependedFilePaths);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment