forked from qt-creator/qt-creator
Clang: Workaround for clang bug to gather inclusions
We have to revert it if the fix is going in. Change-Id: I28418e6c7cf6c40afdb5025eb1a52c13a0aa1302 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
@@ -316,11 +316,16 @@ UnsavedFiles &TranslationUnit::unsavedFiles() const
|
|||||||
|
|
||||||
void TranslationUnit::updateIncludeFilePaths() const
|
void TranslationUnit::updateIncludeFilePaths() const
|
||||||
{
|
{
|
||||||
|
auto oldDependedFilePaths = d->dependedFilePaths;
|
||||||
|
|
||||||
d->dependedFilePaths.clear();
|
d->dependedFilePaths.clear();
|
||||||
d->dependedFilePaths.insert(filePath());
|
d->dependedFilePaths.insert(filePath());
|
||||||
|
|
||||||
clang_getInclusions(d->translationUnit, includeCallback, const_cast<TranslationUnit*>(this));
|
clang_getInclusions(d->translationUnit, includeCallback, const_cast<TranslationUnit*>(this));
|
||||||
|
|
||||||
|
if (d->dependedFilePaths.size() == 1)
|
||||||
|
d->dependedFilePaths = oldDependedFilePaths;
|
||||||
|
|
||||||
d->translationUnits.addWatchedFiles(d->dependedFilePaths);
|
d->translationUnits.addWatchedFiles(d->dependedFilePaths);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user